Function: keymap-local-lookup
keymap-local-lookup is a byte-compiled function defined in
keymap.el.gz.
Signature
(keymap-local-lookup KEYS &optional ACCEPT-DEFAULT)
Documentation
Return the binding for command KEYS in current local keymap only.
KEY is a string that satisfies key-valid-p.
The binding is probably a symbol with a function definition.
If optional argument ACCEPT-DEFAULT is non-nil, recognize default
bindings; see the description of keymap-lookup for more details
about this.
Probably introduced at or before Emacs version 29.1.
Source Code
;; Defined in /usr/src/emacs/lisp/keymap.el.gz
(defun keymap-local-lookup (keys &optional accept-default)
"Return the binding for command KEYS in current local keymap only.
KEY is a string that satisfies `key-valid-p'.
The binding is probably a symbol with a function definition.
If optional argument ACCEPT-DEFAULT is non-nil, recognize default
bindings; see the description of `keymap-lookup' for more details
about this."
(declare (compiler-macro (lambda (form) (keymap--compile-check keys) form)))
(when-let* ((map (current-local-map)))
(keymap-lookup map keys accept-default)))