]> code.delx.au - gnu-emacs/commitdiff
(perl-font-lock-syntactic-keywords): Recognize `sub ($$)'.
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 3 Apr 2008 22:10:44 +0000 (22:10 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 3 Apr 2008 22:10:44 +0000 (22:10 +0000)
lisp/ChangeLog
lisp/progmodes/perl-mode.el

index ca6be0f0d1d0c5a01f1baa0f63a68b2868b95b73..d8aad9da9533c7b3fd72fe4e6666ecbf5b70895a 100644 (file)
@@ -1,3 +1,8 @@
+2008-04-03  Giuliano Procida  <giuliano.procida@googlemail.com>  (tiny change)
+
+       * progmodes/perl-mode.el (perl-font-lock-syntactic-keywords):
+       Recognize `sub ($$)'.
+
 2008-04-03  Richard Sharman  <rsharman@pobox.com>
 
        * hilit-chg.el (highlight-changes-mode): Rename from
index b0f513fb9966277d028525d07ccfab4861d03dfa..f1d1a38d95052abc2343346f53c8d14f77c59658 100644 (file)
@@ -265,9 +265,9 @@ The expansion is entirely correct because it uses the C preprocessor."
     ("\\$ ?{?^?[_a-zA-Z][_a-zA-Z0-9]*\\('\\)[_a-zA-Z]" (1 "_"))
     ;; format statements
     ("^[ \t]*format.*=[ \t]*\\(\n\\)" (1 '(7)))
-    ;; Funny things in sub arg specifications like `sub myfunc ($$)'
+    ;; Funny things in `sub' arg-specs like `sub myfun ($)' or `sub ($)'.
     ;; Be careful not to match "sub { (...) ... }".
-    ("\\<sub[[:space:]]+[^{}[:punct:][:space:]]+[[:space:]]*(\\([^)]+\\))"
+    ("\\<sub\\(?:[[:space:]]+[^{}[:punct:][:space:]]+\\)?[[:space:]]*(\\([^)]+\\))"
      1 '(1))
     ;; Regexp and funny quotes.
     ("\\(?:[?:.,;=!~({[]\\|\\(^\\)\\)[ \t\n]*\\(/\\)"