Mercurial > emacs
diff lisp/eshell/eshell.el @ 43321:358616bbe6a1
(eshell-command): Before reading from the minibuffer, add
eshell-add-command-to-history to minibuffer-exit-hook, and remove it
after read-from-minibuffer returns.
| author | John Wiegley <johnw@newartisans.com> |
|---|---|
| date | Sat, 16 Feb 2002 07:10:35 +0000 |
| parents | 64274328203b |
| children | 9f4f7bee7b8d |
line wrap: on
line diff
--- a/lisp/eshell/eshell.el Sat Feb 16 07:10:26 2002 +0000 +++ b/lisp/eshell/eshell.el Sat Feb 16 07:10:35 2002 +0000 @@ -397,10 +397,12 @@ (unwind-protect (let ((eshell-non-interactive-p t)) (add-hook 'minibuffer-setup-hook 'eshell-mode) + (add-hook 'minibuffer-exit-hook 'eshell-add-command-to-history) (add-hook 'eshell-mode-hook 'eshell-return-exits-minibuffer) (unless command (setq command (read-from-minibuffer "Emacs shell command: ")))) (remove-hook 'eshell-mode-hook 'eshell-return-exits-minibuffer) + (remove-hook 'minibuffer-exit-hook 'eshell-add-command-to-history) (remove-hook 'minibuffer-setup-hook 'eshell-mode)) (unless command (error "No command specified!"))
