diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-10-04 19:45:05 +0200 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-10-04 19:45:05 +0200 |
commit | 44ef24342fd8a2ac876212124ebf38673acda35a (patch) | |
tree | 793dc4ba4197559b4bc65339d713c0807a7b2ca9 /lisp/replace.el | |
parent | afb765ab3cab7b6582d0def543b23603cd076445 (diff) | |
parent | d8665e6d3473403c90a0831e83439a013d0012d3 (diff) | |
download | emacs-44ef24342fd8a2ac876212124ebf38673acda35a.tar.gz emacs-44ef24342fd8a2ac876212124ebf38673acda35a.tar.bz2 emacs-44ef24342fd8a2ac876212124ebf38673acda35a.zip |
Merge remote-tracking branch 'savannah/master' into HEAD
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." (defvar ido-ignore-item-temp-list) +(defun multi-occur--prompt () + (concat + "Next buffer to search " + (cond + ((eq read-buffer-function #'ido-read-buffer) + (substitute-command-keys + "(\\<ido-completion-map>\\[ido-select-text] to end): ")) + ((bound-and-true-p fido-mode) + (substitute-command-keys + "(\\<icomplete-fido-mode-map>\\[icomplete-fido-exit] to end): ")) + (t "(RET to end): ")))) + (defun multi-occur (bufs regexp &optional nlines) "Show all lines in buffers BUFS containing a match for REGEXP. Optional argument NLINES specifies the number of context lines to show @@ -1587,11 +1599,7 @@ See also `multi-occur-in-matching-buffers'." (buf nil) (ido-ignore-item-temp-list bufs)) (while (not (string-equal - (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)) + (setq buf (read-buffer (multi-occur--prompt) nil t)) "")) (cl-pushnew buf bufs) (setq ido-ignore-item-temp-list bufs)) |