aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorPaul Eggert2011-10-07 23:17:40 -0700
committerPaul Eggert2011-10-07 23:17:40 -0700
commitf7dfe84eeacb0316d2ceb8ed5fa59d50c4a7bdc8 (patch)
tree9422bfdf8ef7825621ef55e5464ec6a97d1f06db /lisp
parent619e0f19b389388caa93b5f9b3966f79b0305a1b (diff)
parent61a57ef48995138f7b798d979ff189751f0acbfc (diff)
downloademacs-f7dfe84eeacb0316d2ceb8ed5fa59d50c4a7bdc8.tar.gz
emacs-f7dfe84eeacb0316d2ceb8ed5fa59d50c4a7bdc8.zip
Merge from trunk.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/eshell/eshell.el20
2 files changed, 14 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6c32655d96c..fdc61721a13 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12011-10-08 Thierry Volpiatto <thierry.volpiatto@gmail.com>
2
3 * lisp/eshell/eshell.el (eshell-command): Avoid using hooks.
4
12011-10-07 Chong Yidong <cyd@stupidchicken.com> 52011-10-07 Chong Yidong <cyd@stupidchicken.com>
2 6
3 * bindings.el ([M-left],[M-right]): Bind to left-word and 7 * bindings.el ([M-left],[M-right]): Bind to left-word and
diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el
index 08bb30d67ba..c33c2ccf9d1 100644
--- a/lisp/eshell/eshell.el
+++ b/lisp/eshell/eshell.el
@@ -344,16 +344,16 @@ With prefix ARG, insert output into the current buffer at point."
344 (require 'esh-cmd) 344 (require 'esh-cmd)
345 (unless arg 345 (unless arg
346 (setq arg current-prefix-arg)) 346 (setq arg current-prefix-arg))
347 (unwind-protect 347 (let ((eshell-non-interactive-p t))
348 (let ((eshell-non-interactive-p t)) 348 ;; Enable `eshell-mode' only in this minibuffer.
349 ;; Enable `eshell-mode' only in this minibuffer. 349 (minibuffer-with-setup-hook #'(lambda ()
350 (minibuffer-with-setup-hook 'eshell-mode 350 (eshell-mode)
351 (add-hook 'minibuffer-exit-hook 'eshell-add-command-to-history) 351 (eshell-return-exits-minibuffer))
352 (add-hook 'eshell-mode-hook 'eshell-return-exits-minibuffer) 352 (unwind-protect
353 (unless command 353 (unless command
354 (setq command (read-from-minibuffer "Emacs shell command: "))))) 354 (setq command (read-from-minibuffer "Emacs shell command: ")))
355 (remove-hook 'eshell-mode-hook 'eshell-return-exits-minibuffer) 355 (when command
356 (remove-hook 'minibuffer-exit-hook 'eshell-add-command-to-history)) 356 (eshell-add-input-to-history command)))))
357 (unless command 357 (unless command
358 (error "No command specified!")) 358 (error "No command specified!"))
359 ;; redirection into the current buffer is achieved by adding an 359 ;; redirection into the current buffer is achieved by adding an