mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-05 15:11:30 -08:00
* lisp/isearch.el (isearch-search-fun-default): Nicer error
message when the search fails.
This commit is contained in:
parent
0887bdf90b
commit
d976561ba2
1 changed files with 17 additions and 10 deletions
|
|
@ -2643,16 +2643,23 @@ Can be changed via `isearch-search-fun-function' for special needs."
|
|||
(isearch-regexp isearch-regexp-lax-whitespace)
|
||||
(t isearch-lax-whitespace))
|
||||
search-whitespace-regexp)))
|
||||
(funcall
|
||||
(if isearch-forward #'re-search-forward #'re-search-backward)
|
||||
(cond (isearch-regexp-function
|
||||
(let ((lax (isearch--lax-regexp-function-p)))
|
||||
(if (functionp isearch-regexp-function)
|
||||
(funcall isearch-regexp-function string lax)
|
||||
(word-search-regexp string lax))))
|
||||
(isearch-regexp string)
|
||||
(t (regexp-quote string)))
|
||||
bound noerror count))))
|
||||
(condition-case er
|
||||
(funcall
|
||||
(if isearch-forward #'re-search-forward #'re-search-backward)
|
||||
(cond (isearch-regexp-function
|
||||
(let ((lax (isearch--lax-regexp-function-p)))
|
||||
(if (functionp isearch-regexp-function)
|
||||
(funcall isearch-regexp-function string lax)
|
||||
(word-search-regexp string lax))))
|
||||
(isearch-regexp string)
|
||||
(t (regexp-quote string)))
|
||||
bound noerror count)
|
||||
(search-failed
|
||||
(signal (car er)
|
||||
(let ((prefix (get isearch-regexp-function 'isearch-message-prefix)))
|
||||
(if (and isearch-regexp-function (stringp prefix))
|
||||
(list (format "%s [using %ssearch]" string prefix))
|
||||
(cdr er)))))))))
|
||||
|
||||
(defun isearch-search-string (string bound noerror)
|
||||
"Search for the first occurrence of STRING or its translation.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue