X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/721c270052e4e4fc671472ac871d6fe61be3681b..ab7d7f3c0cad5145d6e171ff29b8443bd34706cc:/packages/hydra/hydra.el diff --git a/packages/hydra/hydra.el b/packages/hydra/hydra.el index 16d44b0e1..8c6ce7f95 100644 --- a/packages/hydra/hydra.el +++ b/packages/hydra/hydra.el @@ -5,7 +5,7 @@ ;; Author: Oleh Krehel ;; Maintainer: Oleh Krehel ;; URL: https://github.com/abo-abo/hydra -;; Version: 0.13.3 +;; Version: 0.13.5 ;; Keywords: bindings ;; Package-Requires: ((cl-lib "0.5")) @@ -141,20 +141,21 @@ warn: keep KEYMAP and issue a warning instead of running the command." "Disable the current Hydra." (setq hydra-deactivate nil) (remove-hook 'pre-command-hook 'hydra--clearfun) - (if (fboundp 'remove-function) - (remove-function input-method-function #'hydra--imf) - (when hydra--input-method-function - (setq input-method-function hydra--input-method-function) - (setq hydra--input-method-function nil))) + (unless hydra--ignore + (if (fboundp 'remove-function) + (remove-function input-method-function #'hydra--imf) + (when hydra--input-method-function + (setq input-method-function hydra--input-method-function) + (setq hydra--input-method-function nil)))) (dolist (frame (frame-list)) (with-selected-frame frame (when overriding-terminal-local-map - (internal-pop-keymap hydra-curr-map 'overriding-terminal-local-map) - (unless hydra--ignore - (when hydra-curr-on-exit - (let ((on-exit hydra-curr-on-exit)) - (setq hydra-curr-on-exit nil) - (funcall on-exit)))))))) + (internal-pop-keymap hydra-curr-map 'overriding-terminal-local-map)))) + (unless hydra--ignore + (when hydra-curr-on-exit + (let ((on-exit hydra-curr-on-exit)) + (setq hydra-curr-on-exit nil) + (funcall on-exit))))) (unless (fboundp 'internal-push-keymap) (defun internal-push-keymap (keymap symbol) @@ -585,7 +586,7 @@ The expressions can be auto-expanded according to NAME." offset) (while (setq start (string-match - "\\(?:%\\( ?-?[0-9]*s?\\)\\(`[a-z-A-Z/0-9]+\\|(\\)\\)\\|\\(?:_\\( ?-?[0-9]*?\\)\\(\\[\\|]\\|[-[:alnum:] ~.,;:/|?<>={}*+#%@!&]+?\\)_\\)" + "\\(?:%\\( ?-?[0-9]*s?\\)\\(`[a-z-A-Z/0-9]+\\|(\\)\\)\\|\\(?:_\\( ?-?[0-9]*?\\)\\(\\[\\|]\\|[-[:alnum:] ~.,;:/|?<>={}*+#%@!&^]+?\\)_\\)" docstring start)) (cond ((eq ?_ (aref (match-string 0 docstring) 0)) (let* ((key (match-string 4 docstring)) @@ -600,7 +601,7 @@ The expressions can be auto-expanded according to NAME." hydra-key-format-spec (concat "%" (match-string 3 docstring) "s")) t nil docstring))) - (error "Unrecognized key: _%s_" key)))) + (warn "Unrecognized key: _%s_" key)))) (t (let* ((varp (if (eq ?` (aref (match-string 2 docstring) 0)) 1 0)) @@ -1148,6 +1149,8 @@ DOC defaults to TOGGLE-NAME split and capitalized." 0 i))))) +(require 'ring) + (defvar hydra-pause-ring (make-ring 10) "Ring for paused hydras.")