Function: kkp-restore-legacy-keys
kkp-restore-legacy-keys is a natively compiled function defined in
kkp.el.
Signature
(kkp-restore-legacy-keys ORIG-FUN &rest ARGS)
Documentation
Call ORIG-FUN with ARGS while KKP key encoding is temporarily disabled.
Intended for use as :around advice on a function that runs a blocking,
synchronous subprocess and relies on C-g to abort it (see the
discussion in kkp-restore-legacy-keys-around-subprocesses). Attach it to
exactly the commands you need, for example:
(advice-add 'envrc--export :around #'kkp-restore-legacy-keys)
While ORIG-FUN runs in a terminal where KKP is active, C-g reaches Emacs
as the raw quit-char byte and can interrupt the subprocess. It is a
no-op in terminals where KKP is not active.
Source Code
;; Defined in /nix/store/0igl9q4k4n87vg4h2gnnrlha21kx9biv-emacs-packages-deps/share/emacs/site-lisp/elpa/kkp-20260706.858/kkp.el
(defun kkp-restore-legacy-keys (orig-fun &rest args)
"Call ORIG-FUN with ARGS while KKP key encoding is temporarily disabled.
Intended for use as `:around' advice on a function that runs a blocking,
synchronous subprocess and relies on `C-g' to abort it (see the
discussion in `kkp-restore-legacy-keys-around-subprocesses'). Attach it to
exactly the commands you need, for example:
(advice-add \\='envrc--export :around #\\='kkp-restore-legacy-keys)
While ORIG-FUN runs in a terminal where KKP is active, `C-g' reaches Emacs
as the raw `quit-char' byte and can interrupt the subprocess. It is a
no-op in terminals where KKP is not active."
(kkp-with-legacy-keys (apply orig-fun args)))