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

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

[elpa] master 222ba95 2/6: hydra-examples.el: splitters take numeric arg


From: Oleh Krehel
Subject: [elpa] master 222ba95 2/6: hydra-examples.el: splitters take numeric argument
Date: Wed, 04 Feb 2015 18:51:20 +0000

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

    hydra-examples.el: splitters take numeric argument
    
    * hydra-examples.el (hydra-move-splitter-left): Take ARG.
    (hydra-move-splitter-right): Take ARG.
    (hydra-move-splitter-up): Take ARG.
    (hydra-move-splitter-down): Take ARG.
---
 hydra-examples.el |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/hydra-examples.el b/hydra-examples.el
index 834db70..3dfc836 100644
--- a/hydra-examples.el
+++ b/hydra-examples.el
@@ -43,37 +43,37 @@
 
 (require 'windmove)
 
-(defun hydra-move-splitter-left ()
+(defun hydra-move-splitter-left (arg)
   "Move window splitter left."
-  (interactive)
+  (interactive "p")
   (if (let ((windmove-wrap-around))
         (windmove-find-other-window 'right))
-      (shrink-window-horizontally 1)
-    (enlarge-window-horizontally 1)))
+      (shrink-window-horizontally arg)
+    (enlarge-window-horizontally arg)))
 
-(defun hydra-move-splitter-right ()
+(defun hydra-move-splitter-right (arg)
   "Move window splitter right."
-  (interactive)
+  (interactive "p")
   (if (let ((windmove-wrap-around))
         (windmove-find-other-window 'right))
-      (enlarge-window-horizontally 1)
-    (shrink-window-horizontally 1)))
+      (enlarge-window-horizontally arg)
+    (shrink-window-horizontally arg)))
 
-(defun hydra-move-splitter-up ()
+(defun hydra-move-splitter-up (arg)
   "Move window splitter up."
-  (interactive)
+  (interactive "p")
   (if (let ((windmove-wrap-around))
         (windmove-find-other-window 'up))
-      (enlarge-window 1)
-    (shrink-window 1)))
+      (enlarge-window arg)
+    (shrink-window arg)))
 
-(defun hydra-move-splitter-down ()
+(defun hydra-move-splitter-down (arg)
   "Move window splitter down."
-  (interactive)
+  (interactive "p")
   (if (let ((windmove-wrap-around))
         (windmove-find-other-window 'up))
-      (shrink-window 1)
-    (enlarge-window 1)))
+      (shrink-window arg)
+    (enlarge-window arg)))
 
 (defvar hydra-example-move-window-splitter
   '(("h" hydra-move-splitter-left)



reply via email to

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