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
Message #23 received at 22097 <at> debbugs.gnu.org (full text, mbox):
> \( \| \| \)
> --+ _+ \( \| \)\( \| \)*\( \)+
> /\w \( \) \w [-_] [.:/@]+\( \| \)+
> \( \| \)+[.:@] \w [-_~=?&]
> \w [-_]
This is a nice ASCII-art in itself :-), but the problem is in another place -
in ispell-highlight-spelling-error-overlay you can see word boundaries
"\\b" that were added for every search string to not highlight parts
of words, such as when the current check is for e.g. "init", we don't
want to highlight "init" in the words "initialize", "initially", etc.
The drawback of this approach is that it depends on the word syntax in a
particular mode.
Another limitation is limiting lazy-highlighting by reg-start/reg-end
instead of a wider area of window-start/window-end.
Finally, we need now here this fix:
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index fe27f0f..aa51446 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -2809,6 +2809,7 @@ ispell-highlight-spelling-error-overlay
(regexp-quote (buffer-substring-no-properties start end))
"\\b"))
(isearch-regexp t)
+ (isearch-regexp-function nil)
(isearch-case-fold-search nil)
(isearch-forward t)
(isearch-other-end start)
This bug report was last modified 4 years and 257 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.