summaryrefslogtreecommitdiff
path: root/lisp/eshell
diff options
context:
space:
mode:
authorthierry volpiatto <thierry.volpiatto@gmail.com>2011-10-11 07:41:39 +0200
committerthierry volpiatto <thierry.volpiatto@gmail.com>2011-10-11 07:41:39 +0200
commit93e616fdc5f4ef9161570028ed4329128db09777 (patch)
tree77d5572d5c7a36a7d7b07f431cd708b6636517bd /lisp/eshell
parentaf7b60780c53288370c658deb9f79f281991990e (diff)
downloademacs-93e616fdc5f4ef9161570028ed4329128db09777.tar.gz
* lisp/eshell/eshell.el (eshell-command): History have to be saved only in interactive use to avoid error.
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/eshell.el8
1 files changed, 3 insertions, 5 deletions
diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el
index c33c2ccf9d1..0c1c03941e5 100644
--- a/lisp/eshell/eshell.el
+++ b/lisp/eshell/eshell.el
@@ -349,11 +349,9 @@ With prefix ARG, insert output into the current buffer at point."
(minibuffer-with-setup-hook #'(lambda ()
(eshell-mode)
(eshell-return-exits-minibuffer))
- (unwind-protect
- (unless command
- (setq command (read-from-minibuffer "Emacs shell command: ")))
- (when command
- (eshell-add-input-to-history command)))))
+ (unless command
+ (setq command (read-from-minibuffer "Emacs shell command: "))
+ (eshell-add-input-to-history command))))
(unless command
(error "No command specified!"))
;; redirection into the current buffer is achieved by adding an