all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] minibuffer issue with eshell-command
@ 2011-10-06  7:09 Thierry Volpiatto
  2011-10-06 12:48 ` Thierry Volpiatto
  0 siblings, 1 reply; 8+ messages in thread
From: Thierry Volpiatto @ 2011-10-06  7:09 UTC (permalink / raw
  To: emacs-devel

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 <thierry.volpiatto@gmail.com>


---
 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 point."
     (setq arg current-prefix-arg))
   (unwind-protect
       (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 




^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-10-10 18:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-06  7:09 [PATCH] minibuffer issue with eshell-command Thierry Volpiatto
2011-10-06 12:48 ` Thierry Volpiatto
2011-10-06 15:00   ` Chong Yidong
2011-10-06 15:36   ` Stefan Monnier
2011-10-06 16:22     ` Thierry Volpiatto
2011-10-07 14:04       ` Thierry Volpiatto
2011-10-07 19:12         ` Thierry Volpiatto
2011-10-10 18:36           ` Thierry Volpiatto

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.