unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Tim Van Holder <tim.vanholder@gmail.com>
Cc: emacs-pretest-bug@gnu.org
Subject: Re: 23.0.50; (perl mode) Minor fontification issue
Date: Fri, 30 Nov 2007 14:19:56 -0500	[thread overview]
Message-ID: <jwv63zjy21q.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87d4trajax.fsf@leeloo.anubex.internal> (Tim Van Holder's message of "Fri, 30 Nov 2007 15:40:06 +0100")

> 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	other threads:[~2007-11-30 19:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-30 14:40 23.0.50; (perl mode) Minor fontification issue Tim Van Holder
2007-11-30 19:19 ` Stefan Monnier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv63zjy21q.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=tim.vanholder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).