; (grep-read-files): Fix completion table

* lisp/progmodes/grep.el (grep-read-files): Cease returning
some completion candidates unconditionally.  Use
'completion-file-name-table' over 'read-file-name-internal'
because the latter uses 'completion-table-with-quoting', and
that doesn't blend well with other tables in
'completion-table-merge'.

https://lists.gnu.org/archive/html/emacs-devel/2024-06/msg01194.html
This commit is contained in:
Eshel Yaron 2024-07-02 14:03:01 +02:00
parent 921d40759e
commit 850fc68481
No known key found for this signature in database
GPG key ID: EF3EE9CA35D78618

View file

@ -1181,9 +1181,7 @@ REGEXP is used as a string in the prompt."
(files (completing-read
(format-prompt "Search for \"%s\" in files matching wildcard"
default regexp)
(completion-table-merge
(lambda (_string _pred _action) defaults)
#'read-file-name-internal)
(completion-table-merge defaults #'completion-file-name-table)
nil nil nil 'grep-files-history defaults)))
(and files
(or (cdr (assoc files grep-files-aliases))