bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#11014: cperl syntax highlighting breaking on certain complex regular


From: Stefan Kangas
Subject: bug#11014: cperl syntax highlighting breaking on certain complex regular expressions
Date: Fri, 01 Nov 2019 21:22:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Nathan Trapuzzano <nbtrap@nbtrap.com> writes:

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

I can't reproduce this on current master.  Are you still seeing this
on a modern version of Emacs?

If I don't hear back from you within a couple of weeks, Ill just close
this bug as unreproducible.

Best regards,
Stefan Kangas





reply via email to

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