Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#493 1 commento 1 reazione 1 assegnatario Vedi su GitHub

@zonuexe ci sta già lavorando.

Dal 9/1/2019.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Bug

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.

Lingua principale
Emacs Lisp
Stelle
604
Fork
117
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di emacs-php/php-mode

Tutte le issue di emacs-php/php-mode

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.