]> code.delx.au - gnu-emacs-elpa/commitdiff
hydra.el: Bump version
authorOleh Krehel <ohwoeowho@gmail.com>
Thu, 16 Apr 2015 12:13:37 +0000 (14:13 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Thu, 16 Apr 2015 12:33:05 +0000 (14:33 +0200)
hydra.el

index 1c19b79bcf89cc9659b5ddf185b31f5731108e11..27d48d50af9b9ecfd1080b45c5c5682f85536677 100644 (file)
--- a/hydra.el
+++ b/hydra.el
@@ -5,7 +5,7 @@
 ;; Author: Oleh Krehel <ohwoeowho@gmail.com>
 ;; Maintainer: Oleh Krehel <ohwoeowho@gmail.com>
 ;; URL: https://github.com/abo-abo/hydra
-;; Version: 0.12.1
+;; Version: 0.13.0
 ;; Keywords: bindings
 ;; Package-Requires: ((cl-lib "0.5"))
 
@@ -368,6 +368,12 @@ Return DEFAULT if PROP is not in H."
       (setq hydra--input-method-function input-method-function)
       (setq input-method-function nil))))
 
+(defvar hydra-timeout-timer (timer-create)
+  "Timer for `hydra-timeout'.")
+
+(defvar hydra-message-timer (timer-create)
+  "Timer for the hint.")
+
 (defun hydra-keyboard-quit ()
   "Quitting function similar to `keyboard-quit'."
   (interactive)
@@ -633,6 +639,16 @@ In duplicate HEADS, :cmd-name is modified to whatever they duplicate."
         lst
       (append lst (make-list (- n len) nil)))))
 
+(defmacro hydra-multipop (lst n)
+  "Return LST's first N elements while removing them."
+  `(if (<= (length ,lst) ,n)
+       (prog1 ,lst
+         (setq ,lst nil))
+     (prog1 ,lst
+       (setcdr
+        (nthcdr (1- ,n) (prog1 ,lst (setq ,lst (nthcdr ,n ,lst))))
+        nil))))
+
 (defun hydra--matrix (lst rows cols)
   "Create a matrix from elements of LST.
 The matrix size is ROWS times COLS."
@@ -709,12 +725,6 @@ NAMES should be defined by `defhydradio' or similar."
   (dolist (n names)
     (set n (aref (get n 'range) 0))))
 
-(defvar hydra-timeout-timer (timer-create)
-  "Timer for `hydra-timeout'.")
-
-(defvar hydra-message-timer (timer-create)
-  "Timer for the hint.")
-
 (defun hydra-idle-message (secs hint)
   "In SECS seconds display HINT."
   (cancel-timer hydra-message-timer)
@@ -969,16 +979,6 @@ DOC defaults to TOGGLE-NAME split and capitalized."
        ',(mapcar (lambda (h) (intern (format "%S/%S" name (car h))))
                  heads))))
 
-(defmacro hydra-multipop (lst n)
-  "Return LST's first N elements while removing them."
-  `(if (<= (length ,lst) ,n)
-       (prog1 ,lst
-         (setq ,lst nil))
-     (prog1 ,lst
-       (setcdr
-        (nthcdr (1- ,n) (prog1 ,lst (setq ,lst (nthcdr ,n ,lst))))
-        nil))))
-
 (defun hydra--radio (parent head)
   "Generate a hydradio with PARENT from HEAD."
   (let* ((name (car head))