From 93e616fdc5f4ef9161570028ed4329128db09777 Mon Sep 17 00:00:00 2001 From: thierry volpiatto Date: Tue, 11 Oct 2011 07:41:39 +0200 Subject: [PATCH] * lisp/eshell/eshell.el (eshell-command): History have to be saved only in interactive use to avoid error. --- lisp/ChangeLog | 5 +++++ lisp/eshell/eshell.el | 8 +++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 17ea3c29686..c84b2ea2f82 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-10-11 Thierry Volpiatto + + * lisp/eshell/eshell.el (eshell-command): History have to be saved + only in interactive use to avoid error. + 2011-10-11 Stefan Monnier * minibuffer.el (completion-file-name-table): Fix last change, 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 -- 2.11.4.GIT