From 850fc68481a75c3c5d97b0c694159110785aa524 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Tue, 2 Jul 2024 14:03:01 +0200 Subject: [PATCH] ; (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 --- lisp/progmodes/grep.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 459f00e6805..e8d1e692d0f 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -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))