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

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

[elpa] externals/ace-window 1194d61 63/92: Add copy-window functionality


From: Stefan Monnier
Subject: [elpa] externals/ace-window 1194d61 63/92: Add copy-window functionality
Date: Wed, 17 Mar 2021 18:39:23 -0400 (EDT)

branch: externals/ace-window
commit 1194d6162ad582174a4852f4e14b86d4053db70d
Author: Eric Froemling <ericfroemling@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    Add copy-window functionality
    
    Fixes #156
    Fixes #149
---
 ace-window.el | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/ace-window.el b/ace-window.el
index 1a24c7b..18333fb 100644
--- a/ace-window.el
+++ b/ace-window.el
@@ -158,10 +158,11 @@ Consider changing this if the overlay tends to overlap 
with other things."
   '((?x aw-delete-window "Delete Window")
     (?m aw-swap-window "Swap Windows")
     (?M aw-move-window "Move Window")
+    (?c aw-copy-window "Copy Window")
     (?j aw-switch-buffer-in-window "Select Buffer")
     (?n aw-flip-window)
     (?u aw-switch-buffer-other-window "Switch Buffer Other Window")
-    (?c aw-split-window-fair "Split Fair Window")
+    (?f aw-split-window-fair "Split Fair Window")
     (?v aw-split-window-vert "Split Vert Window")
     (?b aw-split-window-horz "Split Horz Window")
     (?o delete-other-windows "Delete Other Windows")
@@ -724,6 +725,12 @@ Switch the current window to the previous buffer."
     (aw-switch-to-window window)
     (switch-to-buffer buffer)))
 
+(defun aw-copy-window (window)
+  "Copy the current buffer to WINDOW."
+  (let ((buffer (current-buffer)))
+    (aw-switch-to-window window)
+    (switch-to-buffer buffer)))
+
 (defun aw-split-window-vert (window)
   "Split WINDOW vertically."
   (select-window window)



reply via email to

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