aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/eshell/eshell.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el
index 7515f1792c9..106a161f8fb 100644
--- a/lisp/eshell/eshell.el
+++ b/lisp/eshell/eshell.el
@@ -397,10 +397,12 @@ With prefix ARG, insert output into the current buffer at point."
397 (unwind-protect 397 (unwind-protect
398 (let ((eshell-non-interactive-p t)) 398 (let ((eshell-non-interactive-p t))
399 (add-hook 'minibuffer-setup-hook 'eshell-mode) 399 (add-hook 'minibuffer-setup-hook 'eshell-mode)
400 (add-hook 'minibuffer-exit-hook 'eshell-add-command-to-history)
400 (add-hook 'eshell-mode-hook 'eshell-return-exits-minibuffer) 401 (add-hook 'eshell-mode-hook 'eshell-return-exits-minibuffer)
401 (unless command 402 (unless command
402 (setq command (read-from-minibuffer "Emacs shell command: ")))) 403 (setq command (read-from-minibuffer "Emacs shell command: "))))
403 (remove-hook 'eshell-mode-hook 'eshell-return-exits-minibuffer) 404 (remove-hook 'eshell-mode-hook 'eshell-return-exits-minibuffer)
405 (remove-hook 'minibuffer-exit-hook 'eshell-add-command-to-history)
404 (remove-hook 'minibuffer-setup-hook 'eshell-mode)) 406 (remove-hook 'minibuffer-setup-hook 'eshell-mode))
405 (unless command 407 (unless command
406 (error "No command specified!")) 408 (error "No command specified!"))