Skip to content

Commit

Permalink
Add method modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
Demis Balbach committed Dec 23, 2019
1 parent 451fb60 commit f79dfa9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions php-face.el
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@
:group 'php-faces
:tag "PHP Class Modifiers")

(defface php-modifiers-method '((t (:inherit php-keyword)))
"Face used to highlight method modifiers (final, abstract)"
:group 'php-faces
:tag "PHP Method Modifiers")

(define-obsolete-face-alias 'php-annotations-annotation-face 'php-doc-annotation-tag "1.19.0")

(provide 'php-face)
Expand Down
3 changes: 3 additions & 0 deletions php-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -1554,6 +1554,9 @@ a completion list."

;; Class modifiers (abstract, final)
("\\(abstract\\|final\\)[[:space:]]\\(?:class\\)" (1 'php-modifiers-class))

;; Method modifiers (abstract, final, static)
("\\(abstract\\|final\\)[[:space:]]\\(?:static[[:space:]]\\)?\\(?:public\\|private\\|protected\\)" (1 'php-modifiers-method))

;; Highlight variables, e.g. 'var' in '$var' and '$obj->var', but
;; not in $obj->var()
Expand Down

0 comments on commit f79dfa9

Please sign in to comment.