all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#11014: cperl syntax highlighting breaking on certain complex regular expressions
@ 2012-03-14 13:05 Nathan Trapuzzano
  2012-03-15  3:11 ` Stefan Monnier
  2019-11-01 20:22 ` Stefan Kangas
  0 siblings, 2 replies; 4+ messages in thread
From: Nathan Trapuzzano @ 2012-03-14 13:05 UTC (permalink / raw)
  To: 11014

Syntax highlighting in cperl-mode breaks for certain (or perhaps all)
complex regular expressions modified by /e and/or /x.

Here are 2 examples of offending code:

example 1 -----

sub greek_with_latin
{
    my ($self, $ref) = @_;
#     $self->{perseus_morph} = 0;
    $$ref =~ s/([^\&]*)([^\$]*)/
                                        my $gk = $1 || '';
                                        if ($gk)
                                        {
                                                $self->{perseus_morph} ? 
                                                  $self->perseus_handler(\$gk, 'grk') 
                                                : $self->{greek_handler}->(\$gk);
                                        }
                                        my $lt = $2 || '';
                                        if ($lt)
                                        {
                                                $self->{perseus_morph} ? 
                                                  $self->perseus_handler(\$lt, 'lat') 
                                                : $self->{latin_handler}->(\$lt);
                                        }
                                        $gk.$lt;
                                        /gex;
}

-----
example 2 -----

$$ref =~ s/'/$self->{ibycus4} ? '{\'}' : '\'\''/ge;

-----

Lines of code coming after "blocks" like these are all highlighted as
though they were quoted (at least that's what seems to be the case
judging from the color).

Running Arch build 23.4-1:

In GNU Emacs 23.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.9)
 of 2012-02-01 on shirley.hoetzel.info
configured using `configure  '--prefix=/usr' '--sysconfdir=/etc'
'--libexecdir=/usr/lib' '--localstatedir=/var' '--wit\ h-x-toolkit=gtk'
'--with-xft' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe
-fstack-protector --param=ssp-buffer-size\ =4 -D_FORTIFY_SOURCE=2'
'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu''





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

end of thread, other threads:[~2019-12-01  7:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-14 13:05 bug#11014: cperl syntax highlighting breaking on certain complex regular expressions Nathan Trapuzzano
2012-03-15  3:11 ` Stefan Monnier
2019-11-01 20:22 ` Stefan Kangas
2019-12-01  7:50   ` Stefan Kangas

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.