# HG changeset patch
# User Kim F. Storm <storm@cua.dk>
# Date 1030963285 0
# Node ID 539aabdebd62f1faec1c6dd93fbad5eda4067511
# Parent  d7ff55da60cdff0424ffb2ff3c6fbe0a8e1b1909
(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.

diff -r d7ff55da60cd -r 539aabdebd62 lisp/replace.el
--- 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))