From: Richard M. Stallman Date: Tue, 9 Aug 2005 11:37:32 +0000 (+0000) Subject: (eshell): Avoid warnings about eshell-mode. X-Git-Tag: emacs-pretest-22.0.90~7706 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4caf4844d9591fc723f0919eb7a834bd3e84e515;p=emacs.git (eshell): Avoid warnings about eshell-mode. --- 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 ()