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

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

[elpa] master e5638b1 12/14: ace-window.el (aw-swap-invert): New defcust


From: Oleh Krehel
Subject: [elpa] master e5638b1 12/14: ace-window.el (aw-swap-invert): New defcustom
Date: Thu, 04 Jun 2015 17:05:18 +0000

branch: master
commit e5638b18201c9e06943832f42f6c707563351666
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    ace-window.el (aw-swap-invert): New defcustom
    
    * ace-window.el (aw-swap-window): Update.
    
    Fixes #52
---
 ace-window.el |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/ace-window.el b/ace-window.el
index 30c0f6a..a1c12ed 100644
--- a/ace-window.el
+++ b/ace-window.el
@@ -447,6 +447,10 @@ Windows are numbered top down, left to right."
           (delete-window window)
         (error "Got a dead window %S" window)))))
 
+(defcustom aw-swap-invert nil
+  "When non-nil, the other of the two swapped windows gets the point."
+  :type 'boolean)
+
 (defun aw-swap-window (window)
   "Swap buffers of current window and WINDOW."
   (cl-labels ((swap-windows (window1 window2)
@@ -464,7 +468,9 @@ Windows are numbered top down, left to right."
       (when (and (window-live-p window)
                  (not (eq window this-window)))
         (aw--push-window this-window)
-        (swap-windows this-window window)))))
+        (if aw-swap-invert
+            (swap-windows window this-window)
+          (swap-windows this-window window))))))
 
 (defun aw-split-window-vert (window)
   "Split WINDOW vertically."



reply via email to

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