Mercurial > emacs
changeset 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 | a5dd8224b9a5 |
children | 80c00f33bf18 |
files | lisp/eshell/eshell.el |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
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!"))