diff options
author | Richard M. Stallman <rms@gnu.org> | 2005-08-09 11:37:32 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2005-08-09 11:37:32 +0000 |
commit | 23d57abee5205bd3f4b4226f6f2b102397597482 (patch) | |
tree | 1fd4a104cf9e5624f13a8ddca7844a9a45236f90 | |
parent | 8cd151115fa9a136fe1427d77a04d13c5f5513c8 (diff) | |
download | emacs-23d57abee5205bd3f4b4226f6f2b102397597482.tar.gz |
(eshell): Avoid warnings about eshell-mode.
-rw-r--r-- | lisp/eshell/eshell.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el index 8c13b485cc2..ce9641026c7 100644 --- a/lisp/eshell/eshell.el +++ b/lisp/eshell/eshell.el @@ -374,11 +374,10 @@ buffer selected (or created)." ;; `same-window-buffer-names', which is done when Eshell is loaded (assert (and buf (buffer-live-p buf))) (pop-to-buffer buf) - (unless (fboundp 'eshell-mode) + (if (fboundp 'eshell-mode) + (unless (eq major-mode 'eshell-mode) + (eshell-mode)) (error "`eshell-auto' must be loaded before Eshell can be used")) - (unless (eq major-mode 'eshell-mode) - (eshell-mode)) - (assert (eq major-mode 'eshell-mode)) buf)) (defun eshell-return-exits-minibuffer () |