diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-11-30 19:21:33 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-11-30 19:21:33 +0000 |
commit | a0e3c626e8bbbf06d0c3da0011ab71986c6ee073 (patch) | |
tree | 7b36b5f98a3cc4894055811878a5608b7cc06539 | |
parent | 40632cf37d267f920eaff09a1187227e50bafae4 (diff) | |
download | emacs-a0e3c626e8bbbf06d0c3da0011ab71986c6ee073.tar.gz |
(perl-font-lock-syntactic-keywords): Don't match "sub { (...) ... }".
-rw-r--r-- | lisp/ChangeLog | 9 | ||||
-rw-r--r-- | lisp/progmodes/perl-mode.el | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e94db35386c..f54280e5651 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-11-30 Stefan Monnier <monnier@iro.umontreal.ca> + + * progmodes/perl-mode.el (perl-font-lock-syntactic-keywords): + Don't match "sub { (...) ... }". + 2007-11-29 Richard Stallman <rms@gnu.org> * international/mule-cmds.el (toggle-input-method-active): New var. @@ -45,8 +50,8 @@ 2007-11-16 Eli Zaretskii <eliz@gnu.org> - * international/mule-cmds.el (set-locale-environment): Set - default-file-name-coding-system _after_ keyboard and terminal + * international/mule-cmds.el (set-locale-environment): + Set default-file-name-coding-system _after_ keyboard and terminal coding systems. This fixes last change. * mail/rmail.el (rmail-current-subject-regexp): Allow more than diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 809ed7a9f36..ee14100f56d 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -266,7 +266,9 @@ The expansion is entirely correct because it uses the C preprocessor." ;; 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) |