File tree Expand file tree Collapse file tree 12 files changed +19
-15
lines changed Expand file tree Collapse file tree 12 files changed +19
-15
lines changed Original file line number Diff line number Diff line change 201
201
:group 'php-faces
202
202
:tag " PHPDoc Class Name" )
203
203
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
+
204
209
(define-obsolete-face-alias 'php-annotations-annotation-face 'php-doc-annotation-tag " 1.19.0" )
205
210
206
211
(provide 'php-face )
Original file line number Diff line number Diff line change @@ -1533,6 +1533,8 @@ a completion list."
1533
1533
1 'php-class )
1534
1534
; ; Support the ::class constant in PHP5.6
1535
1535
(" \\ 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 )
1536
1538
1537
1539
; ; Highlight static method calls as such. This is necessary for method
1538
1540
; ; names which are identical to keywords to be highlighted correctly.
Original file line number Diff line number Diff line change 1
1
; ; -*- mode : emacs-lisp -*-
2
2
((" <?php" . php-php-tag)
3
3
(" \n\n " )
4
- (" class" . php-keyword )
4
+ (" class" . php-class-declaration )
5
5
(" " )
6
6
(" Typed" . font-lock-type-face )
7
7
(" \n {\n " )
Original file line number Diff line number Diff line change 64
64
(" \n " )
65
65
(" final" . php-keyword)
66
66
(" " )
67
- (" class" . php-keyword )
67
+ (" class" . php-class-declaration )
68
68
(" " )
69
69
(" SampleClass" . font-lock-type-face )
70
70
(" \n {\n " )
Original file line number Diff line number Diff line change 8
8
(" " )
9
9
(" new" . php-keyword)
10
10
(" " )
11
- (" class" . php-keyword )
11
+ (" class" . php-class-declaration )
12
12
(" () " )
13
13
(" extends" . php-keyword)
14
14
(" " )
21
21
(" (1, " )
22
22
(" new" . php-keyword)
23
23
(" " )
24
- (" class" . php-keyword )
24
+ (" class" . php-class-declaration )
25
25
(" () " )
26
26
(" extends" . php-keyword)
27
27
(" " )
28
28
(" IteratorAggregate" . font-lock-type-face )
29
29
(" {\n " )
30
30
(" // " . font-lock-comment-delimiter-face )
31
31
(" ###php-mode-test### ((indent 4))\n " . font-lock-comment-face )
32
- (" });\n " ))
32
+ (" });\n " ))
Original file line number Diff line number Diff line change 7
7
(" @MyProject\\ Annotations\\ Foobarable" php-doc-annotation-tag font-lock-doc-face )
8
8
(" \n */" . font-lock-doc-face )
9
9
(" \n " )
10
- (" class" . php-keyword )
10
+ (" class" . php-class-declaration )
11
11
(" " )
12
12
(" User" . font-lock-type-face )
13
13
(" \n {\n }\n\n " )
20
20
(" myProperty" php-variable-name font-lock-doc-face )
21
21
(" \n */" . font-lock-doc-face )
22
22
(" \n " )
23
- (" class" . php-keyword )
23
+ (" class" . php-class-declaration )
24
24
(" " )
25
25
(" Child" . font-lock-type-face )
26
26
(" " )
Original file line number Diff line number Diff line change 64
64
(" \n " )
65
65
(" final" . php-keyword)
66
66
(" " )
67
- (" class" . php-keyword )
67
+ (" class" . php-class-declaration )
68
68
(" " )
69
69
(" SampleClass" . font-lock-type-face )
70
70
(" \n {\n " )
Original file line number Diff line number Diff line change 65
65
(" \n " )
66
66
(" final" . php-keyword)
67
67
(" " )
68
- (" class" . php-keyword )
68
+ (" class" . php-class-declaration )
69
69
(" " )
70
70
(" SampleClass" . font-lock-type-face )
71
71
(" \n {\n " )
Original file line number Diff line number Diff line change 64
64
(" \n " )
65
65
(" final" . php-keyword)
66
66
(" " )
67
- (" class" . php-keyword )
67
+ (" class" . php-class-declaration )
68
68
(" " )
69
69
(" SampleClass" . font-lock-type-face )
70
70
(" \n {\n " )
Original file line number Diff line number Diff line change 11
11
(" @ORM\\ Table" php-doc-annotation-tag font-lock-doc-face )
12
12
(" (name=\" product\" )\n */" . font-lock-doc-face )
13
13
(" \n " )
14
- (" class" . php-keyword )
14
+ (" class" . php-class-declaration )
15
15
(" " )
16
16
(" Product" . font-lock-type-face )
17
17
(" \n {\n " )
Original file line number Diff line number Diff line change 19
19
break ;
20
20
case;
21
21
catch;
22
- class ClassName;
23
22
clone ;
24
23
const ;
25
24
continue ;
@@ -53,7 +52,6 @@ function;
53
52
include_once ;
54
53
instanceof ClassName;
55
54
insteadof ClassName;
56
- interface ClassName;
57
55
isset ();
58
56
list();
59
57
namespace ClassName ;
@@ -68,7 +66,6 @@ interface ClassName;
68
66
static;
69
67
switch ;
70
68
throw ;
71
- trait ClassName;
72
69
try ;
73
70
unset();
74
71
use ClassName ;
Original file line number Diff line number Diff line change 1
1
; ; -*- mode : emacs-lisp -*-
2
2
((" <?php" . php-php-tag)
3
3
(" \n\n " )
4
- (" class" . php-keyword )
4
+ (" class" . php-class-declaration )
5
5
(" " )
6
6
(" SomeClass" . font-lock-type-face )
7
7
(" \n {\n " )
You can’t perform that action at this time.
0 commit comments