summaryrefslogtreecommitdiff
path: root/lisp/progmodes/perl-mode.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-12-06 00:46:18 +0000
committerMiles Bader <miles@gnu.org>2007-12-06 00:46:18 +0000
commite5e76c04310d287a56675876dd83e1089faba215 (patch)
treea4b4f1cc134e4fd5af42671ec6689e07afe48ff2 /lisp/progmodes/perl-mode.el
parentb890d447fb56bfe9f2e4742eda4b3ab4b5f4b32a (diff)
parenta2afc99dbad3fa9a3170ad72c578451c3aea58a4 (diff)
downloademacs-e5e76c04310d287a56675876dd83e1089faba215.tar.gz
emacs-e5e76c04310d287a56675876dd83e1089faba215.tar.bz2
emacs-e5e76c04310d287a56675876dd83e1089faba215.zip
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-943
Diffstat (limited to 'lisp/progmodes/perl-mode.el')
-rw-r--r--lisp/progmodes/perl-mode.el4
1 files changed, 3 insertions, 1 deletions
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)