From f9dfad9358b2af36d1496c525585f761c130f095 Mon Sep 17 00:00:00 2001 From: Evgeni Kolev Date: Sat, 3 Mar 2018 13:07:26 +0200 Subject: [PATCH] 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) --- lisp/progmodes/perl-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ ;; Fontify function and package names in declarations. ("\\<\\(package\\|sub\\)\\>[ \t]*\\(\\sw+\\)?" (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t)) - ("\\<\\(import\\|no\\|require\\|use\\)\\>[ \t]*\\(\\sw+\\)?" + ("\\(^\\|[^$@%&\\]\\)\\<\\(import\\|no\\|require\\|use\\)\\>[ \t]*\\(\\sw+\\)?" (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))) "Subdued level highlighting for Perl mode.") -- 2.39.5