diff options
Diffstat (limited to 'lisp/replace.el')
| -rw-r--r-- | lisp/replace.el | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index 035031ac93d..2d17ec9097c 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -1572,6 +1572,18 @@ is not modified." | |||
| 1572 | 1572 | ||
| 1573 | (defvar ido-ignore-item-temp-list) | 1573 | (defvar ido-ignore-item-temp-list) |
| 1574 | 1574 | ||
| 1575 | (defun multi-occur--prompt () | ||
| 1576 | (concat | ||
| 1577 | "Next buffer to search " | ||
| 1578 | (cond | ||
| 1579 | ((eq read-buffer-function #'ido-read-buffer) | ||
| 1580 | (substitute-command-keys | ||
| 1581 | "(\\<ido-completion-map>\\[ido-select-text] to end): ")) | ||
| 1582 | ((bound-and-true-p fido-mode) | ||
| 1583 | (substitute-command-keys | ||
| 1584 | "(\\<icomplete-fido-mode-map>\\[icomplete-fido-exit] to end): ")) | ||
| 1585 | (t "(RET to end): ")))) | ||
| 1586 | |||
| 1575 | (defun multi-occur (bufs regexp &optional nlines) | 1587 | (defun multi-occur (bufs regexp &optional nlines) |
| 1576 | "Show all lines in buffers BUFS containing a match for REGEXP. | 1588 | "Show all lines in buffers BUFS containing a match for REGEXP. |
| 1577 | Optional argument NLINES specifies the number of context lines to show | 1589 | Optional argument NLINES specifies the number of context lines to show |
| @@ -1587,11 +1599,7 @@ See also `multi-occur-in-matching-buffers'." | |||
| 1587 | (buf nil) | 1599 | (buf nil) |
| 1588 | (ido-ignore-item-temp-list bufs)) | 1600 | (ido-ignore-item-temp-list bufs)) |
| 1589 | (while (not (string-equal | 1601 | (while (not (string-equal |
| 1590 | (setq buf (read-buffer | 1602 | (setq buf (read-buffer (multi-occur--prompt) nil t)) |
| 1591 | (if (eq read-buffer-function #'ido-read-buffer) | ||
| 1592 | "Next buffer to search (C-j to end): " | ||
| 1593 | "Next buffer to search (RET to end): ") | ||
| 1594 | nil t)) | ||
| 1595 | "")) | 1603 | "")) |
| 1596 | (cl-pushnew buf bufs) | 1604 | (cl-pushnew buf bufs) |
| 1597 | (setq ido-ignore-item-temp-list bufs)) | 1605 | (setq ido-ignore-item-temp-list bufs)) |