all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 23.0.50; (perl mode) Minor fontification issue
@ 2007-11-30 14:40 Tim Van Holder
  2007-11-30 19:19 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Tim Van Holder @ 2007-11-30 14:40 UTC (permalink / raw)
  To: emacs-pretest-bug


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'); });


In GNU Emacs 23.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.8.20)
 of 2007-11-30 on leeloo
Windowing system distributor `RealVNC Ltd', version 11.0.3370
configured using `configure  '--with-gtk' '--with-xpm' '--with-jpeg' '--with-gif' '--with-tiff' '--with-png' '--with-x' '--with-kerberos' '--with-kerberos5''

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 23.0.50; (perl mode) Minor fontification issue
  2007-11-30 14:40 23.0.50; (perl mode) Minor fontification issue Tim Van Holder
@ 2007-11-30 19:19 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2007-11-30 19:19 UTC (permalink / raw)
  To: Tim Van Holder; +Cc: emacs-pretest-bug

> 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-30 19:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-30 14:40 23.0.50; (perl mode) Minor fontification issue Tim Van Holder
2007-11-30 19:19 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.