branch: elpa/golden-ratio
commit af7c754985de5c6976c56ffa2c5255579ff3e709
Author: Matus Goljer <[email protected]>
Commit: Matus Goljer <[email protected]>

    Added advice on `delete-window`
---
 golden-ratio.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/golden-ratio.el b/golden-ratio.el
index deb99053e6..31334cd897 100644
--- a/golden-ratio.el
+++ b/golden-ratio.el
@@ -99,6 +99,9 @@ the window to be resized to the golden ratio."
   (after golden-ratio-resize-window)
   (golden-ratio))
 
+(defadvice delete-window
+  (after golden-ratio-resize-window)
+  (golden-ratio))
 
 ;;;###autoload
 (defun golden-ratio-enable ()
@@ -106,7 +109,8 @@ the window to be resized to the golden ratio."
   (interactive)
   (ad-activate 'select-window)
   (ad-activate 'other-window)
-  (ad-activate 'split-window))
+  (ad-activate 'split-window)
+  (ad-activate 'delete-window))
 
 
 ;;;###autoload
@@ -115,7 +119,8 @@ the window to be resized to the golden ratio."
   (interactive)
   (ad-deactivate 'select-window)
   (ad-deactivate 'other-window)
-  (ad-deactivate 'split-window))
+  (ad-deactivate 'split-window)
+  (ad-deactivate 'delete-window))
 
 
 (provide 'golden-ratio)

Reply via email to