emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/isearch.el


From: Kim F. Storm
Subject: [Emacs-diffs] Changes to emacs/lisp/isearch.el
Date: Fri, 05 May 2006 23:37:31 +0000

Index: emacs/lisp/isearch.el
diff -u emacs/lisp/isearch.el:1.287 emacs/lisp/isearch.el:1.288
--- emacs/lisp/isearch.el:1.287 Wed May  3 23:27:53 2006
+++ emacs/lisp/isearch.el       Fri May  5 23:37:31 2006
@@ -831,21 +831,10 @@
 (defun isearch-update-ring (string &optional regexp)
   "Add STRING to the beginning of the search ring.
 REGEXP if non-nil says use the regexp search ring."
-  (if regexp
-      (when (or (null regexp-search-ring)
-               (not (string= string (car regexp-search-ring))))
-       (when history-delete-duplicates
-         (setq regexp-search-ring (delete string regexp-search-ring)))
-       (push string regexp-search-ring)
-       (when (> (length regexp-search-ring) regexp-search-ring-max)
-         (setcdr (nthcdr (1- search-ring-max) regexp-search-ring) nil)))
-    (when (or (null search-ring)
-             (not (string= string (car search-ring))))
-      (when history-delete-duplicates
-       (setq search-ring (delete string search-ring)))
-      (push string search-ring)
-      (when (> (length search-ring) search-ring-max)
-       (setcdr (nthcdr (1- search-ring-max) search-ring) nil)))))
+  (add-to-history
+   (if regexp 'regexp-search-ring 'search-ring)
+   string
+   (if regexp regexp-search-ring-max search-ring-max)))
 
 ;; Switching buffers should first terminate isearch-mode.
 ;; ;; For Emacs 19, the frame switch event is handled.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]