# HG changeset patch # User Juri Linkov # Date 1250110486 0 # Node ID a3d4286317cea420d4ae8c3e5f82cf3a567f9029 # Parent a50d4857b8e8fc0ae20f65810921b7d178501193 (lgrep): Ensure that `default-directory' is always non-nil. (Bug#4052) diff -r a50d4857b8e8 -r a3d4286317ce lisp/progmodes/grep.el --- 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)