aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-12-17 20:24:43 +0000
committerRichard M. Stallman1996-12-17 20:24:43 +0000
commit2ff20b7e81e97ba3c9b07bb50d2d978c950cadd5 (patch)
treeb353a605fccec640d837634b23c05e9fe526dad8
parentf3636ea7be3ecd3b41bbac0948c4ac2a39d5ec05 (diff)
downloademacs-2ff20b7e81e97ba3c9b07bb50d2d978c950cadd5.tar.gz
emacs-2ff20b7e81e97ba3c9b07bb50d2d978c950cadd5.zip
(isearch-ring-adjust): Don't pop the state at the start.
Push the state at the end, not in the middle.
-rw-r--r--lisp/isearch.el11
1 files changed, 4 insertions, 7 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 60b85d7d2f2..ebd72dbfc48 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -697,7 +697,7 @@ If first char entered is \\[isearch-yank-word], then do word search instead."
697 (message (isearch-message-prefix nil nil t)) 697 (message (isearch-message-prefix nil nil t))
698 (if (eq 'isearch-yank-word 698 (if (eq 'isearch-yank-word
699 (lookup-key isearch-mode-map (vector e))) 699 (lookup-key isearch-mode-map (vector e)))
700 (setq isearch-word t ;; so message-prefix is right 700 (setq isearch-word t;; so message-prefix is right
701 isearch-new-word t) 701 isearch-new-word t)
702 (cancel-kbd-macro-events) 702 (cancel-kbd-macro-events)
703 (isearch-unread e)) 703 (isearch-unread e))
@@ -705,7 +705,7 @@ If first char entered is \\[isearch-yank-word], then do word search instead."
705 (setq isearch-new-string 705 (setq isearch-new-string
706 (let (junk-ring) 706 (let (junk-ring)
707 (read-from-minibuffer 707 (read-from-minibuffer
708 (isearch-message-prefix nil nil isearch-nonincremental) 708 (isearch-message-prefix nil nil isearch-nonincremental)
709 isearch-string 709 isearch-string
710 minibuffer-local-isearch-map nil 710 minibuffer-local-isearch-map nil
711 'junk-ring)) 711 'junk-ring))
@@ -808,7 +808,6 @@ Use `isearch-exit' to quit without signaling."
808 ;; If already have what to search for, repeat it. 808 ;; If already have what to search for, repeat it.
809 (or isearch-success 809 (or isearch-success
810 (progn 810 (progn
811
812 (goto-char (if isearch-forward (point-min) (point-max))) 811 (goto-char (if isearch-forward (point-min) (point-max)))
813 (setq isearch-wrapped t)))) 812 (setq isearch-wrapped t))))
814 ;; C-s in reverse or C-r in forward, change direction. 813 ;; 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."
1147 1146
1148(defun isearch-ring-adjust (advance) 1147(defun isearch-ring-adjust (advance)
1149 ;; Helper for isearch-ring-advance and isearch-ring-retreat 1148 ;; Helper for isearch-ring-advance and isearch-ring-retreat
1150 (if (cdr isearch-cmds) ;; is there more than one thing on stack?
1151 (isearch-pop-state))
1152 (isearch-ring-adjust1 advance) 1149 (isearch-ring-adjust1 advance)
1153 (isearch-push-state)
1154 (if search-ring-update 1150 (if search-ring-update
1155 (progn 1151 (progn
1156 (isearch-search) 1152 (isearch-search)
1157 (isearch-update)) 1153 (isearch-update))
1158 (isearch-edit-string) 1154 (isearch-edit-string)
1159 )) 1155 )
1156 (isearch-push-state))
1160 1157
1161(defun isearch-ring-advance () 1158(defun isearch-ring-advance ()
1162 "Advance to the next search string in the ring." 1159 "Advance to the next search string in the ring."