comparison lisp/isearch.el @ 90389:146cd8369025

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-60 Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 259-273) - Update from CVS - lisp/replace.el (occur-engine): Bind `inhibit-field-text-motion' to t - Merge from gnus--rel--5.10 - Rename "field-at-point" to "field-at-pos" - (comint-insert-input): Remove redundant calls to setq and goto-char * gnus--rel--5.10 (patch 99-100) - Merge from emacs--devo--0 - Update from CVS
author Miles Bader <miles@gnu.org>
date Wed, 10 May 2006 20:42:41 +0000
parents e3bacb89536a 4e1a43edc7bc
children 8a8e69664178
comparison
equal deleted inserted replaced
90388:a786f674d33f 90389:146cd8369025
824 824
825 (and (not edit) isearch-recursive-edit (exit-recursive-edit))) 825 (and (not edit) isearch-recursive-edit (exit-recursive-edit)))
826 826
827 (defun isearch-update-ring (string &optional regexp) 827 (defun isearch-update-ring (string &optional regexp)
828 "Add STRING to the beginning of the search ring. 828 "Add STRING to the beginning of the search ring.
829 REGEXP says which ring to use." 829 REGEXP if non-nil says use the regexp search ring."
830 (if regexp 830 (add-to-history
831 (if (or (null regexp-search-ring) 831 (if regexp 'regexp-search-ring 'search-ring)
832 (not (string= string (car regexp-search-ring)))) 832 string
833 (progn 833 (if regexp regexp-search-ring-max search-ring-max)))
834 (push string regexp-search-ring)
835 (if (> (length regexp-search-ring) regexp-search-ring-max)
836 (setcdr (nthcdr (1- search-ring-max) regexp-search-ring)
837 nil))))
838 (if (or (null search-ring)
839 (not (string= string (car search-ring))))
840 (progn
841 (push string search-ring)
842 (if (> (length search-ring) search-ring-max)
843 (setcdr (nthcdr (1- search-ring-max) search-ring) nil))))))
844 834
845 ;; Switching buffers should first terminate isearch-mode. 835 ;; Switching buffers should first terminate isearch-mode.
846 ;; ;; For Emacs 19, the frame switch event is handled. 836 ;; ;; For Emacs 19, the frame switch event is handled.
847 ;; (defun isearch-switch-frame-handler () 837 ;; (defun isearch-switch-frame-handler ()
848 ;; (interactive) ;; Is this necessary? 838 ;; (interactive) ;; Is this necessary?