From 52698d459a57d9e17b4b55b1f0a6740317d7e5c7 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 2 Sep 2002 10:41:25 +0000 Subject: [PATCH] (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. --- lisp/replace.el | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lisp/replace.el b/lisp/replace.el index e47fcdec264..449d47e09b8 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -673,14 +673,19 @@ This function acts on multiple buffers; otherwise, it is exactly like `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)) -- 2.39.2