diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 7b7a2cdf019..c5d5d703fc9 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -215,11 +215,16 @@ (eval-and-compile (defconst perl--syntax-exp-intro-keywords '("split" "if" "unless" "until" "while" "print" "printf" - "grep" "map" "not" "or" "and" "for" "foreach" "return")) + "grep" "map" "not" "or" "and" "for" "foreach" "return" "die" + "warn" "eval")) (defconst perl--syntax-exp-intro-regexp (concat "\\(?:\\(?:^\\|[^$@&%[:word:]]\\)" (regexp-opt perl--syntax-exp-intro-keywords) + ;; A HERE document as an argument to printf? + ;; when printing to a filehandle. + "\\|printf?[ \t]*$?[_[:alpha:]][_[:alnum:]]*" + "\\|=>" "\\|[?:.,;|&*=!~({[]" "\\|[^-+][-+]" ;Bug#42168: `+' is intro but `++' isn't! "\\|\\(^\\)\\)[ \t\n]*"))) @@ -335,7 +340,7 @@ "<<\\(~\\)?[ \t]*\\('[^'\n]*'\\|\"[^\"\n]*\"\\|\\\\[[:alpha:]][[:alnum:]]*\\)" ;; The < <<~HERE +look-here +HERE + ); + +$noindent = "New statement in this line"; + +=head2 Test case 10 + +A HERE document as an argument to die. + +=cut + +1 or die <