mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2026-09-11 00:06:36 -04:00
Fix bug when calling rgrep non-interactively
* lisp/progmodes/grep.el (rgrep): Fix bug where running non-interactively requires running it interactively first. (Bug#60024)
This commit is contained in:
parent
ba4bdd6a25
commit
cd5856e403
|
|
@ -1254,6 +1254,10 @@ or not."
|
|||
nil default-directory t))
|
||||
(confirm (equal current-prefix-arg '(4))))
|
||||
(list regexp files dir confirm))))))
|
||||
;; If called non-interactively, also compute the defaults if we
|
||||
;; haven't already.
|
||||
(unless grep-find-template
|
||||
(grep-compute-defaults))
|
||||
(when (and (stringp regexp) (> (length regexp) 0))
|
||||
(unless (and dir (file-accessible-directory-p dir))
|
||||
(setq dir default-directory))
|
||||
|
|
|
|||
Loading…
Reference in a new issue