diff options
-rw-r--r-- | lisp/ibuffer.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 046595a4d90..e5095455c26 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -1079,8 +1079,8 @@ a new window in the current frame, splitting vertically." ;; Make sure that redisplay is performed, otherwise there can be a ;; bad interaction with code in the window-scroll-functions hook (redisplay t) - (when (and (boundp 'ibuffer-auto-mode) ; ibuf-ext.el might not be loaded yet - (buffer-local-value 'ibuffer-auto-mode (window-buffer))) + (when (with-current-buffer (window-buffer) + (eq major-mode 'ibuffer-mode)) (fit-window-to-buffer nil (and owin (/ (frame-height) |