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

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

[nongnu] elpa/golden-ratio 6af760274b 16/95: Fixing several bugs at once


From: ELPA Syncer
Subject: [nongnu] elpa/golden-ratio 6af760274b 16/95: Fixing several bugs at once
Date: Thu, 7 Sep 2023 22:02:10 -0400 (EDT)

branch: elpa/golden-ratio
commit 6af760274b01c837032fb82d21beac3fe2135bc2
Author: Roman Gonzalez <romanandreg@gmail.com>
Commit: Roman Gonzalez <romanandreg@gmail.com>

    Fixing several bugs at once
    
    * issue #13: Adding autoload cookies
    * issue #11: Ctrl-x-o not resizing correctly
    * issue #6: Resize to golden-ratio when splitting windows
---
 golden-ratio.el | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/golden-ratio.el b/golden-ratio.el
index c55634f76c..d012f976b7 100644
--- a/golden-ratio.el
+++ b/golden-ratio.el
@@ -6,7 +6,7 @@
 ;; Mantainer: Roman Gonzalez <romanandreg@gmail.com>
 ;; Created: 13 Oct 2012
 ;; Keywords: Window Resizing
-;; Version: 0.0.3
+;; Version: 0.0.4
 
 ;; Code inspired by ideas from Tatsuhiro Ujihisa
 
@@ -42,6 +42,7 @@
           (enlarge-window ncol t)))))
 
 
+;;;###autoload
 (defun golden-ratio ()
   "Resizes current window to the golden-ratio's size specs"
   (interactive)
@@ -57,17 +58,31 @@
   (after golden-ratio-resize-window)
   (golden-ratio))
 
+(defadvice other-window
+  (after golden-ratio-resize-window)
+  (golden-ratio))
+
+(defadvice split-window
+  (after golden-ratio-resize-window)
+  (golden-ratio))
+
 
+;;;###autoload
 (defun golden-ratio-enable ()
   "Enables golden-ratio's automatic window resizing"
   (interactive)
-  (ad-activate 'select-window))
+  (ad-activate 'select-window)
+  (ad-activate 'other-window)
+  (ad-activate 'split-window))
 
 
+;;;###autoload
 (defun golden-ratio-disable ()
   "Disables golden-ratio's automatic window resizing"
   (interactive)
-  (ad-deactivate 'select-window))
+  (ad-deactivate 'select-window)
+  (ad-deactivate 'other-window)
+  (ad-deactivate 'split-window))
 
 
 (provide 'golden-ratio)



reply via email to

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