Subject: bug#28615: [PATCH] Clarify what grep-read-files wants

From: Allen Li <[email-masked]>
Date: Wed, 4 Oct 2017 21:15:32 -0700

grep-read-files wants a filename glob, not a filename/path.

* lisp/progmodes/grep.el (grep-read-files): Clarify docstring.
  Use file aliases for completion.
  Clarify completing-read prompt.
---
 lisp/progmodes/grep.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 01bdb04714..0537c76d30 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -903,7 +903,7 @@ grep-read-regexp
   (read-regexp "Search for" 'grep-tag-default 'grep-regexp-history))

 (defun grep-read-files (regexp)
-  "Read files arg for interactive grep."
+  "Read filename glob arg for interactive grep."
   (let* ((bn (or (buffer-file-name)
  (replace-regexp-in-string "<[0-9]+>\\'" "" (buffer-name))))
  (fn (and bn
@@ -936,10 +936,10 @@ grep-read-files
         (car (car grep-files-aliases))))
  (files (completing-read
  (concat "Search for \"" regexp
- "\" in files"
+ "\" in files matching glob"
  (if default (concat " (default " default ")"))
  ": ")
- 'read-file-name-internal
+ grep-files-aliases
  nil nil nil 'grep-files-history
  (delete-dups
    (delq nil (append (list default default-alias default-extension)
-- 
2.14.2