Mercurial > emacs
diff lisp/progmodes/perl-mode.el @ 79514:4ad6fcfba45b
(perl-font-lock-syntactic-keywords): Don't match "sub { (...) ... }".
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 30 Nov 2007 19:21:33 +0000 |
parents | ccfc1f1f4817 |
children | f81c00b9c0ff 53108e6cea98 |
line wrap: on
line diff
--- a/lisp/progmodes/perl-mode.el Fri Nov 30 16:09:01 2007 +0000 +++ b/lisp/progmodes/perl-mode.el Fri Nov 30 19:21:33 2007 +0000 @@ -266,7 +266,9 @@ ;; format statements ("^[ \t]*format.*=[ \t]*\\(\n\\)" (1 '(7))) ;; Funny things in sub arg specifications like `sub myfunc ($$)' - ("\\<sub\\s-+\\S-+\\s-*(\\([^)]+\\))" 1 '(1)) + ;; Be careful not to match "sub { (...) ... }". + ("\\<sub[[:space:]]+[^{}[:punct:][:space:]]+[[:space:]]*(\\([^)]+\\))" + 1 '(1)) ;; Regexp and funny quotes. ("\\(?:[?:.,;=!~({[]\\|\\(^\\)\\)[ \t\n]*\\(/\\)" (2 (if (and (match-end 1)