GNU bug report logs -
#9918
24.0.90; lazy-highlighting in Info mode
Previous Next
Reported by: Dani Moncayo <dmoncayo <at> gmail.com>
Date: Mon, 31 Oct 2011 14:50:02 UTC
Severity: normal
Found in version 24.0.90
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From "emacs -Q":
> 1. Open Info node "(emacs)Top" (C-h r).
> 2. Move point to the end of the first paragraph.
> 3. Type "C-s extensible".
>
> The word "extensible" (in the first line of the paragraph) should be
> lazy-highlighted, as happens if you repeat the experiment after doing
> "M-x text-mode".
The difference between this recipe in a normal buffer and an Info buffer
is in the line
(when (not isearch-error)
in `isearch-lazy-highlight-new-loop'. A normal Isearch starts
a new lazy highlighting loop even if there is no success
(`isearch-success' is nil) and no errors (`isearch-error' is nil).
But Info Isearch sets `isearch-error' to "initial node", so
`isearch-lazy-highlight-new-loop' doesn't start lazy-highlighting.
It seems with the error "initial node", it's still possible to
lazy-highlight other matches. So it's not a normal error,
and we can make an exception for this type of "error".
This will work with the following patch:
=== modified file 'lisp/isearch.el'
--- lisp/isearch.el 2011-10-30 14:41:20 +0000
+++ lisp/isearch.el 2011-10-31 23:12:01 +0000
@@ -2721,7 +2721,7 @@ (defun isearch-lazy-highlight-new-loop (
;; something important did indeed change
(lazy-highlight-cleanup t) ;kill old loop & remove overlays
(setq isearch-lazy-highlight-error isearch-error)
- (when (not isearch-error)
+ (when (or (not isearch-error) (equal isearch-error "initial node"))
(setq isearch-lazy-highlight-start-limit beg
isearch-lazy-highlight-end-limit end)
(setq isearch-lazy-highlight-window (selected-window)
But it's not good to hardcode it, so perhaps we should introduce
a special property for errors that are not quite an error,
and set it just for "initial node".
This bug report was last modified 13 years and 171 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.