diff options
Diffstat (limited to 'lisp/progmodes/perl-mode.el')
-rw-r--r-- | lisp/progmodes/perl-mode.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index f864f6a34cd..127b24cb890 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -214,7 +214,9 @@ (defconst perl--syntax-exp-intro-regexp (concat "\\(?:\\(?:^\\|[^$@&%[:word:]]\\)" (regexp-opt perl--syntax-exp-intro-keywords) - "\\|[-?:.,;|&+*=!~({[]\\|\\(^\\)\\)[ \t\n]*"))) + "\\|[?:.,;|&*=!~({[]" + "\\|[^-+][-+]" ;Bug#42168: `+' is intro but `++' isn't! + "\\|\\(^\\)\\)[ \t\n]*"))) (defun perl-syntax-propertize-function (start end) (let ((case-fold-search nil)) @@ -235,7 +237,7 @@ (match-beginning 0)))))) (string-to-syntax ". p")))) ;; Handle funny names like $DB'stop. - ("\\$ ?{?^?[_[:alpha:]][_[:alnum:]]*\\('\\)[_[:alpha:]]" (1 "_")) + ("\\$ ?{?\\^?[_[:alpha:]][_[:alnum:]]*\\('\\)[_[:alpha:]]" (1 "_")) ;; format statements ("^[ \t]*format.*=[ \t]*\\(\n\\)" (1 (prog1 "\"" (perl-syntax-propertize-special-constructs end)))) |