Function: hydra--clearfun

hydra--clearfun is a byte-compiled function defined in hydra.el.

Signature

(hydra--clearfun)

Documentation

Disable the current Hydra unless this-command is a head.

Source Code

;; Defined in ~/.emacs.d/elpa/hydra-20250316.1254/hydra.el
(defun hydra--clearfun ()
  "Disable the current Hydra unless `this-command' is a head."
  (unless (eq this-command 'hydra-pause-resume)
    (when (or
           (memq this-command '(handle-switch-frame
                                keyboard-quit))
           (null overriding-terminal-local-map)
           (not (or (eq this-command
                        (lookup-key hydra-curr-map (this-single-command-keys)))
                    (cl-case hydra-curr-foreign-keys
                      (warn
                       (setq this-command 'hydra-amaranth-warn))
                      (run
                       t)
                      (t nil)))))
      (hydra-disable))))