1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-28 10:56:36 +00:00

(isearch-ring-adjust): Don't pop the state at the start.

Push the state at the end, not in the middle.
This commit is contained in:
Richard M. Stallman 1996-12-17 20:24:43 +00:00
parent f3636ea7be
commit 2ff20b7e81

View File

@ -697,7 +697,7 @@ If first char entered is \\[isearch-yank-word], then do word search instead."
(message (isearch-message-prefix nil nil t)) (message (isearch-message-prefix nil nil t))
(if (eq 'isearch-yank-word (if (eq 'isearch-yank-word
(lookup-key isearch-mode-map (vector e))) (lookup-key isearch-mode-map (vector e)))
(setq isearch-word t ;; so message-prefix is right (setq isearch-word t;; so message-prefix is right
isearch-new-word t) isearch-new-word t)
(cancel-kbd-macro-events) (cancel-kbd-macro-events)
(isearch-unread e)) (isearch-unread e))
@ -705,7 +705,7 @@ If first char entered is \\[isearch-yank-word], then do word search instead."
(setq isearch-new-string (setq isearch-new-string
(let (junk-ring) (let (junk-ring)
(read-from-minibuffer (read-from-minibuffer
(isearch-message-prefix nil nil isearch-nonincremental) (isearch-message-prefix nil nil isearch-nonincremental)
isearch-string isearch-string
minibuffer-local-isearch-map nil minibuffer-local-isearch-map nil
'junk-ring)) 'junk-ring))
@ -808,7 +808,6 @@ Use `isearch-exit' to quit without signaling."
;; If already have what to search for, repeat it. ;; If already have what to search for, repeat it.
(or isearch-success (or isearch-success
(progn (progn
(goto-char (if isearch-forward (point-min) (point-max))) (goto-char (if isearch-forward (point-min) (point-max)))
(setq isearch-wrapped t)))) (setq isearch-wrapped t))))
;; C-s in reverse or C-r in forward, change direction. ;; C-s in reverse or C-r in forward, change direction.
@ -1147,16 +1146,14 @@ If you want to search for just a space, type C-q SPC."
(defun isearch-ring-adjust (advance) (defun isearch-ring-adjust (advance)
;; Helper for isearch-ring-advance and isearch-ring-retreat ;; Helper for isearch-ring-advance and isearch-ring-retreat
(if (cdr isearch-cmds) ;; is there more than one thing on stack?
(isearch-pop-state))
(isearch-ring-adjust1 advance) (isearch-ring-adjust1 advance)
(isearch-push-state)
(if search-ring-update (if search-ring-update
(progn (progn
(isearch-search) (isearch-search)
(isearch-update)) (isearch-update))
(isearch-edit-string) (isearch-edit-string)
)) )
(isearch-push-state))
(defun isearch-ring-advance () (defun isearch-ring-advance ()
"Advance to the next search string in the ring." "Advance to the next search string in the ring."