Skip to content

Commit b6cbe1b

Browse files
committed
Fix class highlighting
1 parent db3ca4a commit b6cbe1b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

php-mode.el

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,9 +1494,6 @@ a completion list."
14941494
;; only add patterns here if you want to prevent cc-mode from applying
14951495
;; a different face.
14961496
`(
1497-
;; Class declaration keywords (class, trait, interface)
1498-
("class\\|trait\\|interface" . 'php-class-declaration)
1499-
15001497
;; Highlight variables, e.g. 'var' in '$var' and '$obj->var', but
15011498
;; not in $obj->var()
15021499
("\\(->\\)\\(\\sw+\\)\\s-*(" (1 'php-object-op) (2 'php-method-call))
@@ -1536,6 +1533,8 @@ a completion list."
15361533
1 'php-class)
15371534
;; Support the ::class constant in PHP5.6
15381535
("\\sw+\\(::\\)\\(class\\)\\b" (1 'php-paamayim-nekudotayim) (2 'php-magical-constant))
1536+
;; Class declaration keywords (class, trait, interface)
1537+
("\\_<\\(class\\|trait\\|interface\\)\\_>" . 'php-class-declaration)
15391538

15401539
;; Highlight static method calls as such. This is necessary for method
15411540
;; names which are identical to keywords to be highlighted correctly.

0 commit comments

Comments
 (0)