1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-28 10:56:36 +00:00

Fix highlighting in cperl-mode for "for /regex/"

* lisp/progmodes/cperl-mode.el (cperl-find-pods-heres): Fix
highlighting of regexp in "print for /./;" (bug#49192).
This commit is contained in:
E. Choroba 2021-06-24 18:15:07 +02:00 committed by Lars Ingebrigtsen
parent ed30a7290c
commit 8febca87c3

View File

@ -3981,7 +3981,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face',
(not (memq (preceding-char)
'(?$ ?@ ?& ?%)))
(looking-at
"\\(while\\|if\\|unless\\|until\\|and\\|or\\|not\\|xor\\|split\\|grep\\|map\\|print\\|say\\|return\\)\\>"))))
"\\(while\\|if\\|unless\\|until\\|for\\(each\\)?\\|and\\|or\\|not\\|xor\\|split\\|grep\\|map\\|print\\|say\\|return\\)\\>"))))
(and (eq (preceding-char) ?.)
(eq (char-after (- (point) 2)) ?.))
(bobp))