summaryrefslogtreecommitdiff
path: root/lisp/isearch.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2022-08-01 22:19:01 +0300
committerJuri Linkov <juri@linkov.net>2022-08-01 22:19:01 +0300
commit7320a812e9e0624480406309a3cad18db38ff87a (patch)
tree4a78b6d9b6b845b92052d02d08042acf8e4b203b /lisp/isearch.el
parent9d8a6c82838f2f24e76a67379b02956aa668d7cf (diff)
downloademacs-7320a812e9e0624480406309a3cad18db38ff87a.tar.gz
Wrap around the search on typing a letter (bug#56535)
* doc/emacs/search.texi (Repeat Isearch): Improve values no/no-ding. * lisp/isearch.el (isearch-search-and-update): Try to repeat the search on an error when isearch-wrap-pause is no/no-ding.
Diffstat (limited to 'lisp/isearch.el')
-rw-r--r--lisp/isearch.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 8f480a87d94..336c5f1bde2 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2838,7 +2838,9 @@ The command accepts Unicode names like \"smiling face\" or
isearch-barrier
(1+ isearch-other-end)))))
(isearch-search)
- ))
+ (when (and (memq isearch-wrap-pause '(no no-ding))
+ (not isearch-success))
+ (isearch-repeat (if isearch-forward 'forward 'backward)))))
(isearch-push-state)
(if isearch-op-fun (funcall isearch-op-fun))
(isearch-update))