]> code.delx.au - gnu-emacs-elpa/commitdiff
Fix unbind of key-chord when hydra is active
authorOleh Krehel <ohwoeowho@gmail.com>
Mon, 14 Dec 2015 12:17:01 +0000 (13:17 +0100)
committerOleh Krehel <ohwoeowho@gmail.com>
Mon, 14 Dec 2015 12:17:01 +0000 (13:17 +0100)
* hydra.el (hydra-disable): Don't remove advice on
  `input-method-function' unless `hydra--ignore' is nil.

Fixes #97

hydra.el

index a7a71acc737ddff39fce2a34b0a2f338cb8ecc34..898e2090380043201043d217d6f195e9558c029e 100644 (file)
--- a/hydra.el
+++ b/hydra.el
@@ -141,11 +141,12 @@ 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