emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r106007: * lisp/eshell/eshell.el (esh


From: thierry volpiatto
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106007: * lisp/eshell/eshell.el (eshell-command): Enable `eshell-mode' only in current minibuffer (Fix bug with recursive minibuffers).
Date: Thu, 06 Oct 2011 17:56:15 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106007 [merge]
committer: thierry volpiatto <address@hidden
branch nick: trunk
timestamp: Thu 2011-10-06 17:56:15 +0200
message:
  * lisp/eshell/eshell.el (eshell-command): Enable `eshell-mode' only in 
current minibuffer (Fix bug with recursive minibuffers).
modified:
  lisp/eshell/eshell.el
=== modified file 'lisp/eshell/eshell.el'
--- a/lisp/eshell/eshell.el     2011-03-05 20:07:27 +0000
+++ b/lisp/eshell/eshell.el     2011-10-06 15:18:48 +0000
@@ -346,14 +346,14 @@
     (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: "))))
+        ;; Enable `eshell-mode' only in this minibuffer.
+        (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


reply via email to

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