Commit 770f36f8 authored by Juri Linkov's avatar Juri Linkov
Browse files

(lgrep): Ensure that `default-directory' is always non-nil. (Bug#4052)

parent fc5bdf6c
......@@ -827,7 +827,7 @@ This command shares argument histories with \\[rgrep] and \\[grep]."
command nil nil 'grep-history))
(add-to-history 'grep-history command))))
(when command
(let ((default-directory dir))
(let ((default-directory (or dir default-directory)))
;; Setting process-setup-function makes exit-message-function work
;; even when async processes aren't supported.
(compilation-start (if (and grep-use-null-device null-device)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment