[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#4052: Emacs hangs with C-u C-u lrgep

From: Juri Linkov
Subject: bug#4052: Emacs hangs with C-u C-u lrgep
Date: Thu, 06 Aug 2009 01:17:43 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]