diff options
| author | thierry volpiatto | 2011-10-06 17:56:15 +0200 |
|---|---|---|
| committer | thierry volpiatto | 2011-10-06 17:56:15 +0200 |
| commit | e97561a80659d6a12a29f97e417d78f35c4e4e34 (patch) | |
| tree | c24d5e85eb3f28c03dd605565fcdc9099417d937 | |
| parent | 453e452200f9c39e7f4fa6ba084efbf6014ba210 (diff) | |
| parent | 695abac19f210c1de4999ff56cdf548b05172fc5 (diff) | |
| download | emacs-e97561a80659d6a12a29f97e417d78f35c4e4e34.tar.gz emacs-e97561a80659d6a12a29f97e417d78f35c4e4e34.zip | |
* lisp/eshell/eshell.el (eshell-command): Enable `eshell-mode' only in current minibuffer (Fix bug with recursive minibuffers).
| -rw-r--r-- | lisp/eshell/eshell.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el index 1a9d7c97b83..08bb30d67ba 100644 --- a/lisp/eshell/eshell.el +++ b/lisp/eshell/eshell.el | |||
| @@ -346,14 +346,14 @@ With prefix ARG, insert output into the current buffer at point." | |||
| 346 | (setq arg current-prefix-arg)) | 346 | (setq arg current-prefix-arg)) |
| 347 | (unwind-protect | 347 | (unwind-protect |
| 348 | (let ((eshell-non-interactive-p t)) | 348 | (let ((eshell-non-interactive-p t)) |
| 349 | (add-hook 'minibuffer-setup-hook 'eshell-mode) | 349 | ;; Enable `eshell-mode' only in this minibuffer. |
| 350 | (add-hook 'minibuffer-exit-hook 'eshell-add-command-to-history) | 350 | (minibuffer-with-setup-hook 'eshell-mode |
| 351 | (add-hook 'eshell-mode-hook 'eshell-return-exits-minibuffer) | 351 | (add-hook 'minibuffer-exit-hook 'eshell-add-command-to-history) |
| 352 | (unless command | 352 | (add-hook 'eshell-mode-hook 'eshell-return-exits-minibuffer) |
| 353 | (setq command (read-from-minibuffer "Emacs shell command: ")))) | 353 | (unless command |
| 354 | (setq command (read-from-minibuffer "Emacs shell command: "))))) | ||
| 354 | (remove-hook 'eshell-mode-hook 'eshell-return-exits-minibuffer) | 355 | (remove-hook 'eshell-mode-hook 'eshell-return-exits-minibuffer) |
| 355 | (remove-hook 'minibuffer-exit-hook 'eshell-add-command-to-history) | 356 | (remove-hook 'minibuffer-exit-hook 'eshell-add-command-to-history)) |
| 356 | (remove-hook 'minibuffer-setup-hook 'eshell-mode)) | ||
| 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 |