File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed
Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -188,13 +188,22 @@ It's intended for the echo area, when a Hydra is active."
188188
189189(defun hydra-disable ()
190190 " Disable the current Hydra."
191- (if (functionp hydra-last)
192- (funcall hydra-last)
193- (while (and (consp (car emulation-mode-map-alists))
194- (consp (caar emulation-mode-map-alists))
195- (equal (cl-cdaar emulation-mode-map-alists) ', keymap ))
196- (setq emulation-mode-map-alists
197- (cdr emulation-mode-map-alists)))))
191+ (cond
192+ ; ; Emacs 25
193+ ((functionp hydra-last)
194+ (funcall hydra-last))
195+
196+ ; ; Emacs 24.4.1
197+ ((boundp 'overriding-terminal-local-map )
198+ (setq overriding-terminal-local-map nil ))
199+
200+ ; ; older
201+ (t
202+ (while (and (consp (car emulation-mode-map-alists))
203+ (consp (caar emulation-mode-map-alists))
204+ (equal (cl-cdaar emulation-mode-map-alists) ', keymap ))
205+ (setq emulation-mode-map-alists
206+ (cdr emulation-mode-map-alists))))))
198207
199208(defun hydra--doc (body-key body-name heads )
200209 " Generate a part of Hydra docstring.
You can’t perform that action at this time.
0 commit comments