# HG changeset patch # User Richard M. Stallman # Date 850854283 0 # Node ID 890b229ea0c70ca5acfc04c1ed2345610ad419f4 # Parent 68c2e772f753e49239b18e5208a17424a2143a49 (isearch-ring-adjust): Don't pop the state at the start. Push the state at the end, not in the middle. diff -r 68c2e772f753 -r 890b229ea0c7 lisp/isearch.el --- a/lisp/isearch.el Tue Dec 17 18:43:10 1996 +0000 +++ b/lisp/isearch.el Tue Dec 17 20:24:43 1996 +0000 @@ -697,7 +697,7 @@ (message (isearch-message-prefix nil nil t)) (if (eq 'isearch-yank-word (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) (cancel-kbd-macro-events) (isearch-unread e)) @@ -705,7 +705,7 @@ (setq isearch-new-string (let (junk-ring) (read-from-minibuffer - (isearch-message-prefix nil nil isearch-nonincremental) + (isearch-message-prefix nil nil isearch-nonincremental) isearch-string minibuffer-local-isearch-map nil 'junk-ring)) @@ -808,7 +808,6 @@ ;; If already have what to search for, repeat it. (or isearch-success (progn - (goto-char (if isearch-forward (point-min) (point-max))) (setq isearch-wrapped t)))) ;; C-s in reverse or C-r in forward, change direction. @@ -1147,16 +1146,14 @@ (defun isearch-ring-adjust (advance) ;; 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-push-state) (if search-ring-update (progn (isearch-search) (isearch-update)) (isearch-edit-string) - )) + ) + (isearch-push-state)) (defun isearch-ring-advance () "Advance to the next search string in the ring."