GNU bug report logs -
#997
perl-mode: Incorrect syntax highlighting for regex at top-level
Previous Next
Reported by: jidanni <at> jidanni.org
Date: Thu, 18 Sep 2008 13:25:04 UTC
Severity: minor
Tags: confirmed, patch
Found in versions 28.0.50, 27.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #26 received at 997 <at> debbugs.gnu.org (full text, mbox):
unmerge 997
reopen 997
thanks
So that's another attempt to exercise my super powers...
It turns out that 997, which had been merged with 26850, is actually a
different issue, and it is not fixed by the recent patch which
successfully dealt with Bug#26850 and Bug#26745 for Perl mode.
CPerl mode handles the examples correctly.
The issues are all related to each other because they all deal with the
difficulties to distinguish between a slash as a division sign and a
slash as a regex introduction. The apostrophe "'" is a red herring - it
increases the visibility of the bug, but isn't the root cause.
Right now, Perl mode tries to detect regexes based on what's before
them. Therefore, 26850 could be fixed by adding "return" to the stuff
which can occur before a regex. However, the examples in this bug
demonstrate regexes with *nothing* before them: Regular expressions can
start a statement just fine, they have a return value and set some
variables as side effects.
Correctly detecting "nothing" in a regex needs some care. So I'd like
to treat this as a separate bug which remains open for now.
--
Cheers,
haj
This bug report was last modified 2 years and 246 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.