aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/eshell
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2005-08-09 11:37:32 +0000
committerRichard M. Stallman <[email protected]>2005-08-09 11:37:32 +0000
commit4caf4844d9591fc723f0919eb7a834bd3e84e515 (patch)
treec5b37c2d5f6756683a6645eef28c5a0c620dc6e8 /lisp/eshell
parent369a47a4fc42e79d2fde1c2bca380db4b79fd77d (diff)
(eshell): Avoid warnings about eshell-mode.
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/eshell.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el
index 8c13b485cc..ce9641026c 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 ()