branch: master commit 742d66a63e86ac740e610faa5abba97e7f8ad5c2 Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
hydra.el: Bump version --- hydra.el | 34 +++++++++++++++++----------------- 1 files changed, 17 insertions(+), 17 deletions(-) diff --git a/hydra.el b/hydra.el index 1c19b79..27d48d5 100644 --- a/hydra.el +++ b/hydra.el @@ -5,7 +5,7 @@ ;; Author: Oleh Krehel <ohwoeo...@gmail.com> ;; Maintainer: Oleh Krehel <ohwoeo...@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))