emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 23.0.50; (perl mode) Minor fontification issue


From: Stefan Monnier
Subject: Re: 23.0.50; (perl mode) Minor fontification issue
Date: Fri, 30 Nov 2007 14:19:56 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

> The following lines fontify correctly in cperl-mode, but not in
> perl-mode: the first quote in the '(#JV.DEVT)' string literal does not
> seem to register. Removing the { after the sub restores correct
> fontification (but obviously breaks the code).

>  skipjv('CONT', sub { (job_variable_value('(#JV.DEVT)') eq 'TAPE'); });
>  skipjv('CONT', sub { (job_variable_value('(#JV.DEVT)') eq 'CASS'); });
>  skipjv('CONT', sub { (job_variable_value('(#JV.DEVT)') eq 'DISK'); });
>  skipjv('ROBI', sub { (job_variable_value('(#JV.DEVT)') eq 'ROBI'); });

Thanks, I've just installed the patch below on the 22 branch.


        Stefan


--- perl-mode.el.~1.72.~        2007-08-25 16:22:26.000000000 -0400
+++ perl-mode.el        2007-11-30 14:14:55.000000000 -0500
@@ -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)


Diffs between working revision and workfile end here.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]