aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2006-05-05 23:37:31 +0000
committerKim F. Storm2006-05-05 23:37:31 +0000
commit77e5aef9ad757adbb7e4a64156cdab82a036059d (patch)
tree55c544354bb55ad3bb7e8ed5fe79a9c87e8ef96c
parent4c5f6185280e155c418568bc6b9844059aa5f992 (diff)
downloademacs-77e5aef9ad757adbb7e4a64156cdab82a036059d.tar.gz
emacs-77e5aef9ad757adbb7e4a64156cdab82a036059d.zip
* isearch.el (isearch-update-ring): Use add-to-history.
-rw-r--r--lisp/isearch.el19
1 files changed, 4 insertions, 15 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 69ffcdd55f6..014c8efe188 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -831,21 +831,10 @@ NOPUSH is t and EDIT is t."
831(defun isearch-update-ring (string &optional regexp) 831(defun isearch-update-ring (string &optional regexp)
832 "Add STRING to the beginning of the search ring. 832 "Add STRING to the beginning of the search ring.
833REGEXP if non-nil says use the regexp search ring." 833REGEXP if non-nil says use the regexp search ring."
834 (if regexp 834 (add-to-history
835 (when (or (null regexp-search-ring) 835 (if regexp 'regexp-search-ring 'search-ring)
836 (not (string= string (car regexp-search-ring)))) 836 string
837 (when history-delete-duplicates 837 (if regexp regexp-search-ring-max search-ring-max)))
838 (setq regexp-search-ring (delete string regexp-search-ring)))
839 (push string regexp-search-ring)
840 (when (> (length regexp-search-ring) regexp-search-ring-max)
841 (setcdr (nthcdr (1- search-ring-max) regexp-search-ring) nil)))
842 (when (or (null search-ring)
843 (not (string= string (car search-ring))))
844 (when history-delete-duplicates
845 (setq search-ring (delete string search-ring)))
846 (push string search-ring)
847 (when (> (length search-ring) search-ring-max)
848 (setcdr (nthcdr (1- search-ring-max) search-ring) nil)))))
849 838
850;; Switching buffers should first terminate isearch-mode. 839;; Switching buffers should first terminate isearch-mode.
851;; ;; For Emacs 19, the frame switch event is handled. 840;; ;; For Emacs 19, the frame switch event is handled.