]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't set isearch-success in isearch-wrap functions
authorJuri Linkov <juri@linkov.net>
Wed, 7 Apr 2021 16:47:09 +0000 (19:47 +0300)
committerJuri Linkov <juri@linkov.net>
Wed, 7 Apr 2021 16:47:09 +0000 (19:47 +0300)
* lisp/comint.el (comint-history-isearch-wrap):
* lisp/simple.el (minibuffer-history-isearch-wrap):
Don't set isearch-success to t, so isearch-repeat won't skip the
beginning of the wrapped match with (forward-char (if isearch-forward 1 -1)).

lisp/comint.el
lisp/isearch.el
lisp/simple.el

index 4f13ff31acbe1d4ca73e8c5966ff2bea43a10aca..9cbcfc03fa612a415d8d2288919e771f0d77884e 100644 (file)
@@ -1627,7 +1627,6 @@ or to the last history element for a backward search."
   (if isearch-forward
       (comint-goto-input (1- (ring-length comint-input-ring)))
     (comint-goto-input nil))
-  (setq isearch-success t)
   (goto-char (if isearch-forward (comint-line-beginning-position) (point-max))))
 
 (defun comint-history-isearch-push-state ()
index a828c569aac0242a1bde587d72621f1d020a0064..4b4f44bdffd0bd221ddd081d59908b22cb329931 100644 (file)
@@ -1887,8 +1887,6 @@ Use `isearch-exit' to quit without signaling."
                 (setq count (1+ count)) ;; Increment to force repeat
                 (setq isearch-wrapped t)
                 (if isearch-wrap-function
-                    ;; Note that some wrap functions change the value of
-                    ;; isearch-success, so it's handled above before this call.
                     (funcall isearch-wrap-function)
                   (goto-char (if isearch-forward (point-min) (point-max)))))))
            ;; Stop looping on failure
index c48e644345beea93185fa0669f01ba894f349e5b..999755a642f4617cf84fe5a1041e7d99c6d52851 100644 (file)
@@ -2798,7 +2798,6 @@ or to the last history element for a backward search."
   (if isearch-forward
       (goto-history-element (length (minibuffer-history-value)))
     (goto-history-element 0))
-  (setq isearch-success t)
   (goto-char (if isearch-forward (minibuffer-prompt-end) (point-max))))
 
 (defun minibuffer-history-isearch-push-state ()