From: Juri Linkov Date: Wed, 12 Aug 2009 20:54:46 +0000 (+0000) Subject: (lgrep): Ensure that `default-directory' is always non-nil. (Bug#4052) X-Git-Tag: emacs-pretest-23.1.90~1881 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=770f36f8bdac1f78dfe2d0395d64283bfa6ab4d1;p=emacs.git (lgrep): Ensure that `default-directory' is always non-nil. (Bug#4052) --- 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)