Skip to content

c-type-list-kwds instances inside strings are fontified #493

Open
@phil-s

Description

@phil-s

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 <thing> 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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions