[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: perl-mode font-lock flaky around $' &c.]
From: |
Stefan Monnier |
Subject: |
Re: address@hidden: perl-mode font-lock flaky around $' &c.] |
Date: |
Thu, 16 Aug 2007 23:38:45 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
> Would someone please try to DTRT with this?
> It could be that other recent changes in perl-mode have made some
> cases worse.
Done,
Stefan
> ------- Start of forwarded message -------
> X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY
> autolearn=failed version=3.1.0
> To: address@hidden
> From: Edward Welbourne <address@hidden>
> Date: Thu, 16 Aug 2007 11:32:55 +0200
> Subject: perl-mode font-lock flaky around $' &c.
> Reply-To: address@hidden
> Put the following (complete with its tabs) into a buffer in perl-mode,
> with font-lock mode active. (tab-width 4 is recommended, but incidental).
> for ( $arg ) {
> /^-([bcdghLpuv]+)$/ && do { $short = $1; last;
> };
> /^--usage/ && do {
> $self->report(0, &usage()); return 0; };
> /^--help/ && do {
> $self->report(0, &help()); return 0; };
> /^--config=/ && do { $config = $'; last; };
> /^--config$/ && do { $short = 'c'; last; };
> /^--unstripped$/&& do { $self->{debug} = 1;
> last; };
> /^--version=/ && do { $self->{version} = $';
> last; };
> /^--version$/ && do { $short = 'v'; last; };
> /^--build=/ && do { $self->{build}
> = $'; last; };
> /^--build$/ && do { $short = 'b';
> last; };
> /^--manifest=/ && do { $self->{manifest} = $';
> last; };
> /^--manifest$/ && do { $short = 'm'; last; };
> /^--date=/ && do { $self->{date} =
> $'; last; };
> /^--date/ && do { $short = 'd';
> last; };
> /^--lang(uage)?s?=/ && do { push @{$self->{langs}},
> split(/,/, $'); last; };
> /^--lang(uage)?s?$/ && do { $short = 'L'; last; };
> /^--all-clean/ && do { $self->{cleanly} = 1;
> last; };
> /^--no-clean/ && do { $self->{cleanly} = -1;
> last; };
> /^--ok-clean/ && do { $self->{cleanly} = 0;
> last; };
> /^--debug=/ && do { $self->{dbglvl}
> = $'; last; };
> /^--debug$/ && do { $short = 'g';
> last; };
> /^--verbose=/ && do { $self->{verbose} = $';
> last; };
> /^--verbose$/ && do { $short = 'p'; last; };
> /^-/ && do { die &usage("Unrecognized
> command-line flag: $arg"); };
> if (!defined($config)) { $config = $arg; }
> elsif (!defined($self->{version})) {
> $self->{version} = $arg; }
> elsif (!defined($self->{build})) {
> $self->{build} = $arg; }
> elsif (!defined($self->{date})) { $self->{date}
> = $arg; }
> else { die &usage("Stray or unrecognized cruft
> at end of command-line: $arg"); }
> }
> Notice, first, that $' confuses the syntax highlighting.
> Next, delete some of the tab characters used for spacing.
> Notice that syntax colouring changes.
> I used to be able to quite sensibly deal with $' (and other $X where X
> would, without a preceding $, complicate font-lock or
> sexp-recognition) by putting an end-of-line comment like #')}
> which would suffice to un-confuse everything.
> This no longer seems to work :-(
> My attempts at it prove highly volatile; seemingly innocuous changes
> elsewhere in the file (e.g. hspace changes, as above) can change how
> everything is displayed. I can make no sense of it.
> In GNU Emacs 22.1.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
> of 2007-07-07 on raven, modified by Debian
> Windowing system distributor `The X.Org Foundation', version 11.0.10300000
> configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu'
> '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
> '--localstatedir=/var/lib' '--infodir=/usr/share/info'
> '--mandir=/usr/share/man' '--with-pop=yes'
> '--enable-locallisppath=/etc/emacs22:/etc/emacs:/usr/local/share/emacs/22.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/22.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/22.1/leim'
> '--with-x=yes' '--with-x-toolkit=athena' '--with-toolkit-scroll-bars'
> 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g
> -O2''
> Important settings:
> value of $LC_ALL: nil
> value of $LC_COLLATE: nil
> value of $LC_CTYPE: nil
> value of $LC_MESSAGES: nil
> value of $LC_MONETARY: nil
> value of $LC_NUMERIC: nil
> value of $LC_TIME: nil
> value of $LANG: en_GB.ISO-8859-15
> locale-coding-system: iso-8859-15
> default-enable-multibyte-characters: t
> Major mode: Perl
> Minor modes in effect:
> tooltip-mode: t
> mouse-wheel-mode: t
> file-name-shadow-mode: t
> global-font-lock-mode: t
> font-lock-mode: t
> blink-cursor-mode: t
> unify-8859-on-encoding-mode: t
> utf-translate-cjk-mode: t
> auto-compression-mode: t
> line-number-mode: t
> Recent input:
> C-x C-s C-p C-d C-d C-d C-n C-d C-d C-d C-n C-d C-d
> C-d C-n C-d C-d C-d C-n C-d C-d C-d C-n C-d C-d C-d
> C-n C-d C-d C-d C-n C-d C-d C-d C-n C-d C-d C-d C-n
> C-d C-d C-d C-n C-d C-d C-d C-n C-d C-d C-d C-n C-d
> C-d C-d C-n C-d C-d C-d C-n C-d C-d C-d C-n C-d C-d
> C-d C-n C-d C-d C-d C-n C-d C-d C-d C-n C-d C-d C-d
> C-n C-d C-d C-d C-n C-d C-d C-d C-n C-p C-d C-/ C-n
> C-d C-d C-d C-n C-d C-d C-d C-n C-d C-d C-d C-n C-d
> C-d C-d C-n C-n C-d C-d C-d C-n C-d C-d C-d C-n C-d
> C-d C-d C-n C-d C-d C-d C-n C-d C-d C-d C-n C-d C-d
> C-d C-n C-M-b C-n C-n C-f C-f C-f C-f C-f C-f C-d C-n
> C-d C-n C-n C-n C-n C-n C-n C-d C-n C-d C-n C-n C-n
> C-d C-n C-d C-n C-n C-n C-n C-n C-n C-d C-n C-d C-/
> C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/
> C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/
> C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/
> C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/
> C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/
> C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/
> C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/
> C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-/ C-n C-l
> C-d C-/ C-p C-d C-/ C-x o C-x C-s M-x e m a <tab> b
> u <tab> <M-backspace> <M-backspace> r e p o <tab> r
> <tab> <return>
> Recent messages:
> forward-sexp: Scan error: "Unbalanced parentheses", 1028, 2730
> Mark saved where search started [5 times]
> Wrote /disk/home/eddy/work/mine/toys/trial
> Auto-saving...done
> Undo! [39 times]
> Redo!
> Undo! [66 times]
> Wrote /disk/home/eddy/work/desk/ubs/platforms/unix/package/lib/Request.pm
> Making completion list...
> Loading emacsbug...done
> _______________________________________________
> bug-gnu-emacs mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs
> ------- End of forwarded message -------
> _______________________________________________
> Emacs-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-devel