From: thierry volpiatto Date: Tue, 11 Oct 2011 05:41:39 +0000 (+0200) Subject: * lisp/eshell/eshell.el (eshell-command): History have to be saved only in interactiv... X-Git-Tag: emacs-pretest-24.0.91~160 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=93e616fdc5f4ef9161570028ed4329128db09777;p=emacs.git * lisp/eshell/eshell.el (eshell-command): History have to be saved only in interactive use to avoid error. --- 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