]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/eshell/eshell.el (eshell-command): History have to be saved only in interactiv...
authorthierry volpiatto <thierry.volpiatto@gmail.com>
Tue, 11 Oct 2011 05:41:39 +0000 (07:41 +0200)
committerthierry volpiatto <thierry.volpiatto@gmail.com>
Tue, 11 Oct 2011 05:41:39 +0000 (07:41 +0200)
lisp/ChangeLog
lisp/eshell/eshell.el

index 17ea3c2968629f8130b4853ca1752e4387be9637..c84b2ea2f820a989507e25a0c2b0784b4af80917 100644 (file)
@@ -1,3 +1,8 @@
+2011-10-11  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
+
+       * lisp/eshell/eshell.el (eshell-command): History have to be saved 
+       only in interactive use to avoid error.
+       
 2011-10-11  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * minibuffer.el (completion-file-name-table): Fix last change,
index c33c2ccf9d1f08b3dd77ab38986d327937e3cd64..0c1c03941e55fcd891879144ac12bbfc20cbc8bc 100644 (file)
@@ -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