Skip to content

Commit 38bbf39

Browse files
committed
Micro optimize php-string-intepolated-variable-font-lock-find
1 parent 561f7b5 commit 38bbf39

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lisp/php-mode.el

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -999,8 +999,7 @@ this ^ lineup"
999999
;; turn call this to be called again.
10001000
(push pair php-mode--propertize-extend-region-current)
10011001
(unwind-protect
1002-
(let ((new-start)
1003-
(new-end))
1002+
(let (new-start new-end)
10041003
(goto-char start)
10051004
(when (re-search-backward php-heredoc-start-re nil t)
10061005
(let ((maybe (point)))
@@ -1479,7 +1478,7 @@ The output will appear in the buffer *PHP*."
14791478
(defun php-string-intepolated-variable-font-lock-find (limit)
14801479
(while (re-search-forward php-string-interpolated-variable-regexp limit t)
14811480
(let ((quoted-stuff (nth 3 (syntax-ppss))))
1482-
(when (and quoted-stuff (member quoted-stuff '(?\" ?`)))
1481+
(when (or (eq ?\" quoted-stuff) (eq ?` quoted-stuff))
14831482
(put-text-property (match-beginning 0) (match-end 0)
14841483
'face 'php-variable-name))))
14851484
nil)

0 commit comments

Comments
 (0)