mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-29 07:58:28 +00:00
* lisp/progmodes/grep.el (grep-read-files): Combine files with aliases.
Use completion-table-merge to combine completions of files from read-file-name-internal with a list of defaults from grep-files-aliases (bug#55800).
This commit is contained in:
parent
abe75e5520
commit
7fdb53ddaf
@ -1066,15 +1066,18 @@ REGEXP is used as a string in the prompt."
|
||||
default-extension
|
||||
(car grep-files-history)
|
||||
(car (car grep-files-aliases))))
|
||||
(defaults
|
||||
(delete-dups
|
||||
(delq nil
|
||||
(append (list default default-alias default-extension)
|
||||
(mapcar #'car grep-files-aliases)))))
|
||||
(files (completing-read
|
||||
(format-prompt "Search for \"%s\" in files matching wildcard"
|
||||
default regexp)
|
||||
#'read-file-name-internal
|
||||
nil nil nil 'grep-files-history
|
||||
(delete-dups
|
||||
(delq nil
|
||||
(append (list default default-alias default-extension)
|
||||
(mapcar #'car grep-files-aliases)))))))
|
||||
(completion-table-merge
|
||||
(lambda (_string _pred _action) defaults)
|
||||
#'read-file-name-internal)
|
||||
nil nil nil 'grep-files-history defaults)))
|
||||
(and files
|
||||
(or (cdr (assoc files grep-files-aliases))
|
||||
files))))
|
||||
|
Loading…
Reference in New Issue
Block a user