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

This commit is contained in:
Juri Linkov 2009-08-12 20:54:46 +00:00
parent fc5bdf6cb1
commit 770f36f8bd

View file

@ -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)