changeset 47204:539aabdebd62

(multi-occur): Made "ido-aware": Changed prompt to use C-j instead of RET to end. Set ido-ignore-item-temp-list to the selected buffers so far, so they are automatically excluded from the list of choices. Use add-to-list instead of push.
author Kim F. Storm <storm@cua.dk>
date Mon, 02 Sep 2002 10:41:25 +0000
parents d7ff55da60cd
children 8a2bf9dded0f
files lisp/replace.el
diffstat 1 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/replace.el	Mon Sep 02 10:40:56 2002 +0000
+++ b/lisp/replace.el	Mon Sep 02 10:41:25 2002 +0000
@@ -673,14 +673,19 @@
 `occur'."
   (interactive
    (cons
-    (let ((bufs (list (read-buffer "First buffer to search: "
-				   (current-buffer) t)))
-	  (buf nil))
+    (let* ((bufs (list (read-buffer "First buffer to search: "
+				    (current-buffer) t)))
+	   (buf nil)
+	   (ido-ignore-item-temp-list bufs))
       (while (not (string-equal
-		   (setq buf (read-buffer "Next buffer to search (RET to end): "
-					  nil t))
+		   (setq buf (read-buffer 
+			      (if (eq read-buffer-function 'ido-read-buffer)
+				  "Next buffer to search (C-j to end): "
+				"Next buffer to search (RET to end): ")
+			      nil t))
 		   ""))
-	(push buf bufs))
+	(add-to-list 'bufs buf)
+	(setq ido-ignore-item-temp-list bufs))
       (nreverse (mapcar #'get-buffer bufs)))
     (occur-read-primary-args)))
   (occur-1 regexp nlines bufs))