diff lisp/progmodes/grep.el @ 104243:a3d4286317ce

(lgrep): Ensure that `default-directory' is always non-nil. (Bug#4052)
author Juri Linkov <juri@jurta.org>
date Wed, 12 Aug 2009 20:54:46 +0000
parents fb68f473a020
children b8afce0dc654
line wrap: on
line diff
--- a/lisp/progmodes/grep.el	Wed Aug 12 20:44:25 2009 +0000
+++ b/lisp/progmodes/grep.el	Wed Aug 12 20:54:46 2009 +0000
@@ -827,7 +827,7 @@
 					  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)