Function: hydra-set-transient-map
hydra-set-transient-map is a byte-compiled function defined in
hydra.el.
Signature
(hydra-set-transient-map KEYMAP ON-EXIT &optional FOREIGN-KEYS)
Documentation
Set KEYMAP to the highest priority.
Call ON-EXIT when the KEYMAP is deactivated.
FOREIGN-KEYS determines the deactivation behavior, when a command that isn't in KEYMAP is called:
nil: deactivate KEYMAP and run the command. run: keep KEYMAP and run the command. warn: keep KEYMAP and issue a warning instead of running the command.
Source Code
;; Defined in ~/.emacs.d/elpa/hydra-20250316.1254/hydra.el
(defun hydra-set-transient-map (keymap on-exit &optional foreign-keys)
"Set KEYMAP to the highest priority.
Call ON-EXIT when the KEYMAP is deactivated.
FOREIGN-KEYS determines the deactivation behavior, when a command
that isn't in KEYMAP is called:
nil: deactivate KEYMAP and run the command.
run: keep KEYMAP and run the command.
warn: keep KEYMAP and issue a warning instead of running the command."
(if hydra-deactivate
(hydra-keyboard-quit)
(setq hydra-curr-map keymap)
(setq hydra-curr-on-exit on-exit)
(setq hydra-curr-foreign-keys foreign-keys)
(add-hook 'pre-command-hook 'hydra--clearfun)
(internal-push-keymap keymap 'overriding-terminal-local-map)))