[Top][All Lists]

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

[PATCH] minibuffer issue with eshell-command

From: Thierry Volpiatto
Subject: [PATCH] minibuffer issue with eshell-command
Date: Thu, 06 Oct 2011 09:09:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

Hi all,
When eshell-command start, it set eshell-mode in all minibuffers:
;(add-hook 'minibuffer-setup-hook 'eshell-mode)
So when running another minibuffer, while eshell-command is started,
it enable eshell-mode in this one, which is wrong.
This patch fix this:

Fix minibuffer-issue in eshell-command.

From: Thierry Volpiatto <address@hidden>

 lisp/eshell/eshell.el |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el
index 1a9d7c9..34d05b0 100644
--- a/lisp/eshell/eshell.el
+++ b/lisp/eshell/eshell.el
@@ -346,14 +346,13 @@ With prefix ARG, insert output into the current buffer at 
     (setq arg current-prefix-arg))
       (let ((eshell-non-interactive-p t))
-       (add-hook 'minibuffer-setup-hook 'eshell-mode)
-       (add-hook 'minibuffer-exit-hook 'eshell-add-command-to-history)
-       (add-hook 'eshell-mode-hook 'eshell-return-exits-minibuffer)
-       (unless command
-         (setq command (read-from-minibuffer "Emacs shell command: "))))
+        (minibuffer-with-setup-hook 'eshell-mode
+          (add-hook 'minibuffer-exit-hook 'eshell-add-command-to-history)
+          (add-hook 'eshell-mode-hook 'eshell-return-exits-minibuffer)
+          (unless command
+            (setq command (read-from-minibuffer "Emacs shell command: ")))))
     (remove-hook 'eshell-mode-hook 'eshell-return-exits-minibuffer)
-    (remove-hook 'minibuffer-exit-hook 'eshell-add-command-to-history)
-    (remove-hook 'minibuffer-setup-hook 'eshell-mode))
+    (remove-hook 'minibuffer-exit-hook 'eshell-add-command-to-history))
   (unless command
     (error "No command specified!"))
   ;; redirection into the current buffer is achieved by adding an

Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 

reply via email to

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