]> code.delx.au - gnu-emacs/blobdiff - lisp/eshell/eshell.el
* lisp/eshell/eshell.el (eshell-command): History have to be saved only in interactiv...
[gnu-emacs] / lisp / eshell / eshell.el
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