aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeni Kolev2018-03-03 13:07:26 +0200
committerEli Zaretskii2018-03-03 13:07:26 +0200
commitf9dfad9358b2af36d1496c525585f761c130f095 (patch)
treed4d094a7ad598d9656e213e851b378b27567feb0
parented071fa79c05e88a2ec3830c0813ed94544854b2 (diff)
downloademacs-f9dfad9358b2af36d1496c525585f761c130f095.tar.gz
emacs-f9dfad9358b2af36d1496c525585f761c130f095.zip
Fix font-lock in perl-mode
* lisp/progmodes/perl-mode.el (perl-font-lock-keywords-1): Prevent the regexp from matching keywords if they start with a Perl sigil. (Bug#30549)
-rw-r--r--lisp/progmodes/perl-mode.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index 99480788f50..c1d94acfa59 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -165,7 +165,7 @@
165 ;; Fontify function and package names in declarations. 165 ;; Fontify function and package names in declarations.
166 ("\\<\\(package\\|sub\\)\\>[ \t]*\\(\\sw+\\)?" 166 ("\\<\\(package\\|sub\\)\\>[ \t]*\\(\\sw+\\)?"
167 (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t)) 167 (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t))
168 ("\\<\\(import\\|no\\|require\\|use\\)\\>[ \t]*\\(\\sw+\\)?" 168 ("\\(^\\|[^$@%&\\]\\)\\<\\(import\\|no\\|require\\|use\\)\\>[ \t]*\\(\\sw+\\)?"
169 (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))) 169 (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)))
170 "Subdued level highlighting for Perl mode.") 170 "Subdued level highlighting for Perl mode.")
171 171