aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/perl-mode.el
diff options
context:
space:
mode:
authorMiles Bader <[email protected]>2007-12-06 09:51:45 +0000
committerMiles Bader <[email protected]>2007-12-06 09:51:45 +0000
commit0bd508417142ff377f34aec8dcec9438d9175c2c (patch)
tree4d60fe09e5cebf7d79766b11e9cda8cc1c9dbb9b /lisp/progmodes/perl-mode.el
parent98fe991da804a42f53f6a5e84cd5eab18a82e181 (diff)
parent9fb1ba8090da3528de56158a79bd3527d31c7f2f (diff)
Merge from emacs--devo--0
Revision: [email protected]/emacs--unicode--0--patch-294
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 bb71491da2..af456f9828 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)