Skip to content

Commit 75d3ee1

Browse files
committed
Replace rx-form with rx-to-string
`rx-form` is being removed in an upcoming version of Emacs and its rewrite of `rx`. Replacing it with `rx-to-string` is backwards and future compatible.
1 parent eb40a89 commit 75d3ee1

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

Diff for: php.el

+18-18
Original file line numberDiff line numberDiff line change
@@ -177,24 +177,24 @@ keywords that can appear in method signatures, e.g. 'final' and
177177
which will be the name of the method."
178178
(when (stringp visibility)
179179
(setq visibility (list visibility)))
180-
(rx-form `(: line-start
181-
(* (syntax whitespace))
182-
,@(if visibility
183-
`((* (or "abstract" "final" "static")
184-
(+ (syntax whitespace)))
185-
(or ,@visibility)
186-
(+ (syntax whitespace))
187-
(* (or "abstract" "final" "static")
188-
(+ (syntax whitespace))))
189-
'((* (* (or "abstract" "final" "static"
190-
"private" "protected" "public")
191-
(+ (syntax whitespace))))))
192-
"function"
193-
(+ (syntax whitespace))
194-
(? "&" (* (syntax whitespace)))
195-
(group (+ (or (syntax word) (syntax symbol))))
196-
(* (syntax whitespace))
197-
"(")))
180+
(rx-to-string `(: line-start
181+
(* (syntax whitespace))
182+
,@(if visibility
183+
`((* (or "abstract" "final" "static")
184+
(+ (syntax whitespace)))
185+
(or ,@visibility)
186+
(+ (syntax whitespace))
187+
(* (or "abstract" "final" "static")
188+
(+ (syntax whitespace))))
189+
'((* (* (or "abstract" "final" "static"
190+
"private" "protected" "public")
191+
(+ (syntax whitespace))))))
192+
"function"
193+
(+ (syntax whitespace))
194+
(? "&" (* (syntax whitespace)))
195+
(group (+ (or (syntax word) (syntax symbol))))
196+
(* (syntax whitespace))
197+
"(")))
198198

199199
(defun php-create-regexp-for-classlike (type)
200200
"Accepts a `TYPE' of a 'classlike' object as a string, such as

0 commit comments

Comments
 (0)