File tree 10 files changed +27
-19
lines changed
10 files changed +27
-19
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ All notable changes of the PHP Mode 1.19.1 release series are documented in this
15
15
* Modify indentation of [ PEAR Coding Standards] ([ #774 ] , [ #777 ] )
16
16
* No longer overindent it by default, since we don't see any mention in the coding style that it should hang ` . ` . (refs [ #227 ] and [ #229 ] )
17
17
* ** If you have any feedback on PEAR style, please let us know in [ the discussion #776 ] [ #776 ] .**
18
+ * Remove ` $ ` from face names for interoperability with treesit ([ #780 ] , [ emacs-php/php-ts-mode #68 ] )
19
+ * ` php-$this ` → ` php-this `
20
+ * ` php-$this-sigil ` → ` php-this-sigil `
18
21
19
22
### Removed
20
23
@@ -28,6 +31,8 @@ All notable changes of the PHP Mode 1.19.1 release series are documented in this
28
31
[ #775 ] : https://github.com/emacs-php/php-mode/pull/775
29
32
[ #776 ] : https://github.com/emacs-php/php-mode/discussions/776
30
33
[ #777 ] : https://github.com/emacs-php/php-mode/pull/777
34
+ [ #780 ] : https://github.com/emacs-php/php-mode/issues/780
35
+ [ emacs-php/php-ts-mode#68 ] : https://github.com/emacs-php/php-ts-mode/pull/68
31
36
[ PEAR Coding Standards ] : https://pear.php.net/manual/en/standards.php
32
37
33
38
## [ 1.25.1] - 2023-11-24
Original file line number Diff line number Diff line change @@ -156,16 +156,19 @@ The operator is also knows as \"Paamayim Nekudotayim\"."
156
156
:group 'php-faces
157
157
:tag " PHP Magical Constant" )
158
158
159
- (defface php-$ this '((t (:inherit php-constant)))
159
+ (defface php-this '((t (:inherit php-constant)))
160
160
" PHP Mode face used to highlight $this variables."
161
161
:group 'php-faces
162
162
:tag " PHP $this" )
163
163
164
- (defface php-$ this-sigil '((t (:inherit php-constant)))
164
+ (defface php-this-sigil '((t (:inherit php-constant)))
165
165
" PHP Mode face used to highlight sigils($) of $this variable."
166
166
:group 'php-faces
167
167
:tag " PHP $this Sigil" )
168
168
169
+ (define-obsolete-face-alias 'php-$this 'php-this " 1.26.0" )
170
+ (define-obsolete-face-alias 'php-$this-sigil 'php-this-sigil " 1.26.0" )
171
+
169
172
(defface php-errorcontrol-op '((t (:inherit font-lock-type-face )))
170
173
" PHP Mode face used to highlight errorcontrol operators (@).."
171
174
:group 'php-faces
Original file line number Diff line number Diff line change @@ -1378,7 +1378,7 @@ for \\[find-tag] (which see)."
1378
1378
(" \\ (!\\ )[^=]" 1 'php-logical-op )
1379
1379
1380
1380
; ; Highlight special variables
1381
- (" \\ (\\ $\\ )\\ (this\\ )\\ >" (1 'php-$ this-sigil ) (2 'php-$ this ))
1381
+ (" \\ (\\ $\\ )\\ (this\\ )\\ >" (1 'php-this-sigil ) (2 'php-this ))
1382
1382
(" \\ (\\ $+\\ )\\ (\\ sw+\\ )" (1 'php-variable-sigil ) (2 'php-variable-name ))
1383
1383
(" \\ (->\\ )\\ ([a-zA-Z0-9_]+\\ )" (1 'php-object-op ) (2 'php-property-name ))
1384
1384
Original file line number Diff line number Diff line change 32
32
(" " )
33
33
(" null" . php-constant)
34
34
(" )\n {\n " )
35
- (" $" . php-$ this-sigil)
36
- (" this" . php-$ this)
35
+ (" $" . php-this-sigil)
36
+ (" this" . php-this)
37
37
(" ->" . php-object-op)
38
38
(" string" . php-property-name)
39
39
(" " )
50
50
(" ()\n {\n " )
51
51
(" var_dump" . php-function-call)
52
52
(" (" )
53
- (" $" . php-$ this-sigil)
54
- (" this" . php-$ this)
53
+ (" $" . php-this-sigil)
54
+ (" this" . php-this)
55
55
(" ->" . php-object-op)
56
56
(" string" . php-property-name)
57
57
(" );\n }\n }\n\n (" )
Original file line number Diff line number Diff line change 103
103
(" $" . php-variable-sigil)
104
104
(" name" . php-variable-name)
105
105
(" )\n {\n " )
106
- (" $" . php-$ this-sigil)
107
- (" this" . php-$ this)
106
+ (" $" . php-this-sigil)
107
+ (" this" . php-this)
108
108
(" ->" . php-object-op)
109
109
(" name" . php-property-name)
110
110
(" = " )
Original file line number Diff line number Diff line change 8
8
(" \n\n " )
9
9
(" // " . font-lock-comment-delimiter-face )
10
10
(" Start:\n " . font-lock-comment-face )
11
- (" $" . php-$ this-sigil)
12
- (" this" . php-$ this)
11
+ (" $" . php-this-sigil)
12
+ (" this" . php-this)
13
13
(" ;\n " )
14
14
(" $" . php-variable-sigil)
15
15
(" that" . php-variable-name)
Original file line number Diff line number Diff line change 105
105
(" $" . php-variable-sigil)
106
106
(" name" . php-variable-name)
107
107
(" )\n {\n " )
108
- (" $" . php-$ this-sigil)
109
- (" this" . php-$ this)
108
+ (" $" . php-this-sigil)
109
+ (" this" . php-this)
110
110
(" ->" . php-object-op)
111
111
(" name" . php-property-name)
112
112
(" " )
Original file line number Diff line number Diff line change 106
106
(" $" . php-variable-sigil)
107
107
(" name" . php-variable-name)
108
108
(" )\n {\n " )
109
- (" $" . php-$ this-sigil)
110
- (" this" . php-$ this)
109
+ (" $" . php-this-sigil)
110
+ (" this" . php-this)
111
111
(" ->" . php-object-op)
112
112
(" name" . php-property-name)
113
113
(" " )
Original file line number Diff line number Diff line change 105
105
(" $" . php-variable-sigil)
106
106
(" name" . php-variable-name)
107
107
(" )\n {\n " )
108
- (" $" . php-$ this-sigil)
109
- (" this" . php-$ this)
108
+ (" $" . php-this-sigil)
109
+ (" this" . php-this)
110
110
(" ->" . php-object-op)
111
111
(" name" . php-property-name)
112
112
(" " )
Original file line number Diff line number Diff line change @@ -533,8 +533,8 @@ style from Drupal."
533
533
(should (eq 'php-variable-name (get-text-property (1- (point )) 'face )))
534
534
535
535
(search-forward " $this" )
536
- (should (eq 'php-$ this-sigil (get-text-property (match-beginning 0 ) 'face )))
537
- (should (eq 'php-$ this (get-text-property (1+ (match-beginning 0 )) 'face )))
536
+ (should (eq 'php-this-sigil (get-text-property (match-beginning 0 ) 'face )))
537
+ (should (eq 'php-this (get-text-property (1+ (match-beginning 0 )) 'face )))
538
538
539
539
(search-forward " $x" )
540
540
(should (eq 'php-variable-sigil (get-text-property (match-beginning 0 ) 'face )))
You can’t perform that action at this time.
0 commit comments