]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix highlighting in cperl-mode for "for /regex/"
authorE. Choroba <choroba@matfyz.cz>
Thu, 24 Jun 2021 16:15:07 +0000 (18:15 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 24 Jun 2021 16:15:07 +0000 (18:15 +0200)
* lisp/progmodes/cperl-mode.el (cperl-find-pods-heres): Fix
highlighting of regexp in "print for /./;" (bug#49192).

lisp/progmodes/cperl-mode.el

index fa384bcad68757c38c308046f53dc7e66a2003db..3370df649199103ecdfd0ee26f2f2c88e0cf5615 100644 (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))