From 770f36f8bdac1f78dfe2d0395d64283bfa6ab4d1 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 12 Aug 2009 20:54:46 +0000 Subject: [PATCH] (lgrep): Ensure that `default-directory' is always non-nil. (Bug#4052) --- lisp/progmodes/grep.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 241a5325a1c..9e63c1d0611 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -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) -- 2.39.5