Commit 30c62133 authored by Juri Linkov's avatar Juri Linkov

* lisp/isearch.el (isearch-lazy-highlight-new-loop):

Remove condition `(not isearch-error)'. 

* lisp/misearch.el (multi-isearch-search-fun): Add condition
`(not bound)' to ignore lazy-highlighting search.
Add the search-failed message "end of multi" when the end of
multi-sequence is reached.  Uncapitalize the search-failed
message "Repeat for next buffer".

* lisp/info.el (Info-search): Add the search-failed message
"end of the manual" when the end of the manual is reached
in Isearch mode.

Fixes: debbugs:9918
parent 645ca9cf
2011-11-19 Juri Linkov <juri@jurta.org>
* isearch.el (isearch-lazy-highlight-new-loop):
Remove condition `(not isearch-error)'. (Bug#9918)
* misearch.el (multi-isearch-search-fun): Add condition
`(not bound)' to ignore lazy-highlighting search.
Add the search-failed message "end of multi" when the end of
multi-sequence is reached. Uncapitalize the search-failed
message "Repeat for next buffer".
* info.el (Info-search): Add the search-failed message
"end of the manual" when the end of the manual is reached
in Isearch mode.
2011-11-19 Juri Linkov <juri@jurta.org>
* info.el (Info-find-node-2, Info-select-node, Info-history-find-node):
......
......@@ -1846,7 +1846,9 @@ If DIRECTION is `backward', search in the reverse direction."
(setq list nil)))
(if found
(message "")
(signal 'search-failed (list regexp))))
(signal 'search-failed (if isearch-mode
(list regexp "end of the manual")
(list regexp)))))
(if (not found)
(progn (Info-read-subfile osubfile)
(goto-char opoint)
......
......@@ -2673,25 +2673,27 @@ by other Emacs features."
;; 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)
(setq isearch-lazy-highlight-start-limit beg
isearch-lazy-highlight-end-limit end)
(setq isearch-lazy-highlight-window (selected-window)
isearch-lazy-highlight-window-start (window-start)
isearch-lazy-highlight-window-end (window-end)
isearch-lazy-highlight-start (point)
isearch-lazy-highlight-end (point)
isearch-lazy-highlight-wrapped nil
isearch-lazy-highlight-last-string isearch-string
isearch-lazy-highlight-case-fold-search isearch-case-fold-search
isearch-lazy-highlight-regexp isearch-regexp
isearch-lazy-highlight-space-regexp search-whitespace-regexp
isearch-lazy-highlight-word isearch-word
isearch-lazy-highlight-forward isearch-forward)
;; It used to check for `(not isearch-error)' here, but actually
;; lazy-highlighting might find matches to highlight even when
;; `isearch-error' is non-nil. (Bug#9918)
(setq isearch-lazy-highlight-start-limit beg
isearch-lazy-highlight-end-limit end)
(setq isearch-lazy-highlight-window (selected-window)
isearch-lazy-highlight-window-start (window-start)
isearch-lazy-highlight-window-end (window-end)
isearch-lazy-highlight-start (point)
isearch-lazy-highlight-end (point)
isearch-lazy-highlight-wrapped nil
isearch-lazy-highlight-last-string isearch-string
isearch-lazy-highlight-case-fold-search isearch-case-fold-search
isearch-lazy-highlight-regexp isearch-regexp
isearch-lazy-highlight-space-regexp search-whitespace-regexp
isearch-lazy-highlight-word isearch-word
isearch-lazy-highlight-forward isearch-forward)
(unless (equal isearch-string "")
(setq isearch-lazy-highlight-timer
(run-with-idle-timer lazy-highlight-initial-delay nil
'isearch-lazy-highlight-update))))))
'isearch-lazy-highlight-update)))))
(defun isearch-lazy-highlight-search ()
"Search ahead for the next or previous match, for lazy highlighting.
......
......@@ -142,7 +142,7 @@ Intended to be added to `isearch-mode-hook'."
;; 1. First try searching in the initial buffer
(let ((res (funcall search-fun string bound noerror)))
;; Reset wrapping for all-buffers pause after successful search
(if (and res (eq multi-isearch-pause t))
(if (and res (not bound) (eq multi-isearch-pause t))
(setq multi-isearch-current-buffer nil))
res)
;; 2. If the above search fails, start visiting next/prev buffers
......@@ -173,8 +173,8 @@ Intended to be added to `isearch-mode-hook'."
found)
;; Return nil when multi-isearch-next-buffer-current-function fails
;; (`with-current-buffer' raises an error for nil returned from it).
(error nil))
(signal 'search-failed (list string "Repeat for next buffer"))))))))
(error (signal 'search-failed (list string "end of multi"))))
(signal 'search-failed (list string "repeat for next buffer"))))))))
(defun multi-isearch-wrap ()
"Wrap the multiple buffers search when search is failed.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment