GNU bug report logs -
#22097
Ispell: lazy highlighting doesn't work properly.
Previous Next
Reported by: Alan Mackenzie <acm <at> muc.de>
Date: Sat, 5 Dec 2015 11:41:02 UTC
Severity: normal
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hello, Eli.
On Sat, Dec 05, 2015 at 04:20:38PM +0200, Eli Zaretskii wrote:
> > Date: Sat, 5 Dec 2015 14:06:09 +0000
> > Cc: 22097 <at> debbugs.gnu.org
> > From: Alan Mackenzie <acm <at> muc.de>
[ .... ]
> > However, the bug manifests itself a bit later on in plain text.
> > There's a paragraph starting at L199 about bidi. After several more
> > hits on the space bar, the first occurrence of "bidi" (L201) gets
> > highlighted; the second occurrence (on the same line) gets lazily
> > highlighted. The third (L204) and fourth (L205) remain unhighlighted.
> > Hit the spacebar another time. All four occurrences are now
> > highlighted.
> > As far as I can see, there's nothing remotely ASCII-arty in that
> > paragraph. Unless the "---" sequences are somehow being interpreted as
> > ASCII-art.
> ispell-skip-region-alist is a complex regexp, something there must've
> (mis)fired.
I've got a little tool that dumps regexps in a more readable form. Here
is what it makes of ispell-skip-region-alist:
\( \| \| \)
--+ _+ \( \| \)\( \| \)*\( \)+
/\w \( \) \w [-_] [.:/@]+\( \| \)+
\( \| \)+[.:@] \w [-_~=?&]
\w [-_]
Clearly, the "---"s are going to trigger the very first alternative of
the regexp. I don't think "bidi.c", of itself, triggers the regexp.
The first two alternatives were added in "for performance reasons" for
when "-" or "_" are part of word syntax. In otherwords, "\w\|[-_]" was
leading to exponential degradation in these circumstances.
However, nowadays we've got "\s_", which probably didn't exist when
ispell.el was written. We could reformulate the regexp using it, which
might allow us to get rid of the "--+" and "_+" alternatives.
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 4 years and 256 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.