aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/isearch.el14
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index af4099d29d8..bb989a73f95 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1,6 +1,6 @@
1;;; isearch.el --- incremental search minor mode 1;;; isearch.el --- incremental search minor mode
2 2
3;; Copyright (C) 1992, 93, 94, 95, 96, 97, 1999, 2000, 2001 3;; Copyright (C) 1992, 93, 94, 95, 96, 97, 1999, 2000, 01, 2003
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu> 6;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu>
@@ -738,15 +738,14 @@ REGEXP says which ring to use."
738 (if (or (null regexp-search-ring) 738 (if (or (null regexp-search-ring)
739 (not (string= string (car regexp-search-ring)))) 739 (not (string= string (car regexp-search-ring))))
740 (progn 740 (progn
741 (setq regexp-search-ring 741 (push string regexp-search-ring)
742 (cons string regexp-search-ring))
743 (if (> (length regexp-search-ring) regexp-search-ring-max) 742 (if (> (length regexp-search-ring) regexp-search-ring-max)
744 (setcdr (nthcdr (1- search-ring-max) regexp-search-ring) 743 (setcdr (nthcdr (1- search-ring-max) regexp-search-ring)
745 nil)))) 744 nil))))
746 (if (or (null search-ring) 745 (if (or (null search-ring)
747 (not (string= string (car search-ring)))) 746 (not (string= string (car search-ring))))
748 (progn 747 (progn
749 (setq search-ring (cons string search-ring)) 748 (push string search-ring)
750 (if (> (length search-ring) search-ring-max) 749 (if (> (length search-ring) search-ring-max)
751 (setcdr (nthcdr (1- search-ring-max) search-ring) nil)))))) 750 (setcdr (nthcdr (1- search-ring-max) search-ring) nil))))))
752 751
@@ -1493,9 +1492,8 @@ With prefix arg N, insert the Nth element."
1493 ;; Helper for isearch-complete and isearch-complete-edit 1492 ;; Helper for isearch-complete and isearch-complete-edit
1494 ;; Return t if completion OK, nil if no completion exists. 1493 ;; Return t if completion OK, nil if no completion exists.
1495 (let* ((ring (if isearch-regexp regexp-search-ring search-ring)) 1494 (let* ((ring (if isearch-regexp regexp-search-ring search-ring))
1496 (alist (mapcar (function (lambda (string) (list string))) ring))
1497 (completion-ignore-case case-fold-search) 1495 (completion-ignore-case case-fold-search)
1498 (completion (try-completion isearch-string alist))) 1496 (completion (try-completion isearch-string ring)))
1499 (cond 1497 (cond
1500 ((eq completion t) 1498 ((eq completion t)
1501 ;; isearch-string stays the same 1499 ;; isearch-string stays the same
@@ -1507,7 +1505,7 @@ With prefix arg N, insert the Nth element."
1507 (if completion-auto-help 1505 (if completion-auto-help
1508 (with-output-to-temp-buffer "*Isearch completions*" 1506 (with-output-to-temp-buffer "*Isearch completions*"
1509 (display-completion-list 1507 (display-completion-list
1510 (all-completions isearch-string alist)))) 1508 (all-completions isearch-string ring))))
1511 t) 1509 t)
1512 (and completion 1510 (and completion
1513 (setq isearch-string completion)))) 1511 (setq isearch-string completion))))
@@ -1529,7 +1527,7 @@ If there is no completion possible, say so and continue searching."
1529(defun isearch-complete-edit () 1527(defun isearch-complete-edit ()
1530 "Same as `isearch-complete' except in the minibuffer." 1528 "Same as `isearch-complete' except in the minibuffer."
1531 (interactive) 1529 (interactive)
1532 (setq isearch-string (buffer-string)) 1530 (setq isearch-string (field-string))
1533 (if (isearch-complete1) 1531 (if (isearch-complete1)
1534 (progn 1532 (progn
1535 (delete-field) 1533 (delete-field)