Skip to content

Commit 79096c8

Browse files
author
Demis Balbach
committed
Add php method access and static modifier faces
1 parent 49ee230 commit 79096c8

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

php-face.el

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,12 @@
202202
:tag "PHPDoc Class Name")
203203

204204
(defface php-class-declaration '((t (:inherit php-keyword)))
205-
"Face used to highlight class declaration keywords"
205+
"Face used to highlight class declaration keywords."
206206
:group 'php-faces
207207
:tag "PHP Class Declaration")
208208

209209
(defface php-class-declaration-spec '((t (:inherit php-keyword)))
210-
"Face used to highlight class declaration specification keywords (implements, extends)"
210+
"Face used to highlight class declaration specification keywords (implements, extends)."
211211
:group 'php-faces
212212
:tag "PHP Class Declaration Specification")
213213

@@ -217,22 +217,32 @@
217217
:tag "PHP Namespace Declaration")
218218

219219
(defface php-import-declaration '((t (:inherit php-keyword)))
220-
"Face used to highlight import statements (use ... as ...)"
220+
"Face used to highlight import statements (use ... as ...)."
221221
:group 'php-faces
222222
:tag "PHP Import Statement")
223223

224224
(defface php-class-modifiers '((t (:inherit php-keyword)))
225-
"Face used to highlight class modifiers (final, abstract)"
225+
"Face used to highlight class modifiers (final, abstract)."
226226
:group 'php-faces
227227
:tag "PHP Class Modifiers")
228228

229229
(defface php-method-modifiers '((t (:inherit php-keyword)))
230-
"Face used to highlight method modifiers (final, abstract)"
230+
"Face used to highlight method modifiers (final, abstract)."
231231
:group 'php-faces
232232
:tag "PHP Method Modifiers")
233233

234+
(defface php-method-access '((t (:inherit php-keyword)))
235+
"Face used to highlight method access keywords (public, protected, private)."
236+
:group 'php-faces
237+
:tag "PHP Method Access")
238+
239+
(defface php-method-static '((t (:inherit php-keyword)))
240+
"Face used to highlight static keyword in method declaration."
241+
:group 'php-faces
242+
:tag "PHP Method Static")
243+
234244
(defface php-property-access '((t (:inherit php-keyword)))
235-
"Face used to highlight property access keywords (public, protected, public)"
245+
"Face used to highlight property access keywords (public, protected, private)."
236246
:group 'php-faces
237247
:tag "PHP Property Access")
238248

php-mode.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1559,7 +1559,10 @@ a completion list."
15591559
("\\(abstract\\|final\\)[[:space:]]\\(?:static\\|public\\|private\\|protected\\)" (1 'php-method-modifiers))
15601560

15611561
;; Method access protection
1562-
1562+
("\\(private\\|protected\\|public\\)[[:space:]]\\(?:static\\|function\\)" (1 'php-method-access))
1563+
1564+
;; Method static modifier
1565+
("\\(static\\)[[:space:]]\\(?:public\\|protected\\|private\\|function\\)" (1 'php-method-static))
15631566

15641567
;; Property access protection
15651568
;("\\(private\\|protected\\|public\\)\\(?:[[:space:]]const[[:space:]][[:word:]]\\|[[:space:]]\$[[:word:]]\\)" (1 'php-property-access))

0 commit comments

Comments
 (0)