emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-28 d96f8b2: Another fix for 'ibuffer-shrink-to-fit' (Bug#7218, Bu


From: Martin Rudalics
Subject: emacs-28 d96f8b2: Another fix for 'ibuffer-shrink-to-fit' (Bug#7218, Bug#51029)
Date: Mon, 11 Oct 2021 12:59:05 -0400 (EDT)

branch: emacs-28
commit d96f8b22c01b330d773cf46eb4c21acbe153633e
Author: Martin Rudalics <rudalics@gmx.at>
Commit: Martin Rudalics <rudalics@gmx.at>

    Another fix for 'ibuffer-shrink-to-fit' (Bug#7218, Bug#51029)
    
    * lisp/ibuffer.el (ibuffer-shrink-to-fit): Fit window only if its
    buffer is in 'ibuffer-mode' (Bug#7218, Bug#51029).
---
 lisp/ibuffer.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 046595a..e509545 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]