]> git.eshelyaron.com Git - emacs.git/commitdiff
(lgrep): Ensure that `default-directory' is always non-nil. (Bug#4052)
authorJuri Linkov <juri@jurta.org>
Wed, 12 Aug 2009 20:54:46 +0000 (20:54 +0000)
committerJuri Linkov <juri@jurta.org>
Wed, 12 Aug 2009 20:54:46 +0000 (20:54 +0000)
lisp/progmodes/grep.el

index 241a5325a1c688b9ab04dc270390add87ea4c40a..9e63c1d0611d349c0bb07f49ae77f1000c11bdca 100644 (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)