bug#4052: Emacs hangs with C-u C-u lrgep
Juri Linkov <[email protected]>
| Newsgroups | gmane.emacs.bugs,gmane.emacs.pretest.bugs |
|---|---|
| Organization | JURTA |
| Message-ID | <[email protected]> |
Emacs hangs and every keystroke beeps with error messages like
cd: Wrong type argument: stringp, nil
file-remote-p: Wrong type argument: stringp, nil
because `C-u C-u M-x lrgep M-p RET' sets `default-directory' to nil.
I believe this is the correct fix:
Index: lisp/progmodes/grep.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/grep.el,v
retrieving revision 1.102
diff -u -r1.102 grep.el
--- lisp/progmodes/grep.el 8 Jul 2009 14:24:00 -0000 1.102
+++ lisp/progmodes/grep.el 5 Aug 2009 22:17:36 -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)
--
Juri Linkov
http://www.jurta.org/emacs/