emacs-php / emacs-php/php-mode
c-type-list-kwds instances inside strings are fontified
- Dominant language
- Emacs Lisp
- Stars
- 602
- Forks
- 117
- Avg merge
- 12h 54m
- Merged PRs (30d)
- 3
Description
e.g. my PHP file contains `$foo = 'Title to use when rendering.';` and the word `when` is highlighted, because it is being treated as the <thing> in a `use ` declaration.
I expect the relevant code is:
```
(c-lang-defconst c-type-list-kwds
php '("new" "use" "implements" "extends" "namespace" "instanceof" "insteadof"))
```
A bit of experimenting suggests that such things only occur for `c-type-list-kwds` and potentially `c-postfix-decl-spec-kwds` (which is a subset of the former), but do not happen for the other uses of `c-lang-defconst`.
Is this just Expected Behaviour from the parent mode, or can `php-mode` do something to prevent such keywords being fontified inside strings?
I notice that this does not happen inside comments.
Contributor guide
Assessment
This issue has not been assessed yet.