]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/hydra/hydra-examples.el
Merge commit 'b963c70dcf211c86d4bb03bfd4a20c6807cbe679' from hydra
[gnu-emacs-elpa] / packages / hydra / hydra-examples.el
index 834db70d790f7334cd2d5e17205b5bc2c37d79c0..3dfc8367b7a3b5bb8065329763b58dc27df700b0 100644 (file)
 
 (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)