Skip to content

Commit 1e06364

Browse files
Demis Balbachzonuexe
Demis Balbach
authored andcommitted
Add class declaration face
Fix php class declaration regex and inherit
1 parent 431ea53 commit 1e06364

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

php-face.el

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,11 @@
201201
:group 'php-faces
202202
:tag "PHPDoc Class Name")
203203

204+
(defface php-class-declaration '((t (:inherit php-keyword)))
205+
"Face used to class declarations."
206+
:group 'php-faces
207+
:tag "PHP Class Declaration")
208+
204209
(define-obsolete-face-alias 'php-annotations-annotation-face 'php-doc-annotation-tag "1.19.0")
205210

206211
(provide 'php-face)

php-mode.el

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,6 +1494,9 @@ 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+
14971500
;; Highlight variables, e.g. 'var' in '$var' and '$obj->var', but
14981501
;; not in $obj->var()
14991502
("\\(->\\)\\(\\sw+\\)\\s-*(" (1 'php-object-op) (2 'php-method-call))

0 commit comments

Comments
 (0)