aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/eshell
diff options
context:
space:
mode:
authorthierry volpiatto2011-10-11 07:41:39 +0200
committerthierry volpiatto2011-10-11 07:41:39 +0200
commit93e616fdc5f4ef9161570028ed4329128db09777 (patch)
tree77d5572d5c7a36a7d7b07f431cd708b6636517bd /lisp/eshell
parentaf7b60780c53288370c658deb9f79f281991990e (diff)
downloademacs-93e616fdc5f4ef9161570028ed4329128db09777.tar.gz
emacs-93e616fdc5f4ef9161570028ed4329128db09777.zip
* 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."
349 (minibuffer-with-setup-hook #'(lambda () 349 (minibuffer-with-setup-hook #'(lambda ()
350 (eshell-mode) 350 (eshell-mode)
351 (eshell-return-exits-minibuffer)) 351 (eshell-return-exits-minibuffer))
352 (unwind-protect 352 (unless command
353 (unless command 353 (setq command (read-from-minibuffer "Emacs shell command: "))
354 (setq command (read-from-minibuffer "Emacs shell command: "))) 354 (eshell-add-input-to-history command))))
355 (when command
356 (eshell-add-input-to-history command)))))
357 (unless command 355 (unless command
358 (error "No command specified!")) 356 (error "No command specified!"))
359 ;; redirection into the current buffer is achieved by adding an 357 ;; redirection into the current buffer is achieved by adding an