diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 96f449c2b05..1c29bfe9cc8 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -620,7 +620,9 @@ substitution string. Note dynamic scoping of variables.") (cdr alias))) (and fn (let ((ext (file-name-extension fn))) - (and ext (concat "*." ext)))))) + (and ext (concat "*." ext)))) + (car grep-files-history) + (car (car grep-files-aliases)))) (files (read-string (concat "Search for \"" regexp "\" in files"