emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/golden-ratio e47c29f87e 78/95: Trigger after split-window


From: ELPA Syncer
Subject: [nongnu] elpa/golden-ratio e47c29f87e 78/95: Trigger after split-window as well
Date: Thu, 7 Sep 2023 22:02:15 -0400 (EDT)

branch: elpa/golden-ratio
commit e47c29f87e519f8b8e614a5c0ab7f6429c220a14
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    Trigger after split-window as well
    
    * golden-ratio.el (split-window): New advice.
    (golden-ratio): Fixup.
---
 golden-ratio.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/golden-ratio.el b/golden-ratio.el
index 8d9dc9c5e1..67970fe91e 100644
--- a/golden-ratio.el
+++ b/golden-ratio.el
@@ -143,8 +143,7 @@ will not cause the window to be resized to the golden 
ratio."
     (let ((golden-ratio-in-progress t))
       (unless (or (window-minibuffer-p)
                   (one-window-p)
-                  (member (symbol-name major-mode)
-                          golden-ratio-exclude-modes)
+                  (golden-ratio-exclude-major-mode-p)
                   (member (buffer-name)
                           golden-ratio-exclude-buffer-names)
                   (and golden-ratio-inhibit-functions
@@ -159,6 +158,10 @@ will not cause the window to be resized to the golden 
ratio."
   (when golden-ratio-mode
     (golden-ratio)))
 
+(defadvice split-window (after golden-ratio-select-window activate)
+  (when golden-ratio-mode
+    (golden-ratio)))
+
 ;;;###autoload
 (define-minor-mode golden-ratio-mode
     "Enable automatic window resizing with golden ratio."



reply via email to

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