Function: embark--all-bindings
embark--all-bindings is a byte-compiled function defined in embark.el.
Signature
(embark--all-bindings KEYMAP &optional NESTED)
Documentation
Return an alist of all bindings in KEYMAP.
If NESTED is non-nil subkeymaps are not flattened.
Source Code
;; Defined in ~/.emacs.d/elpa/embark-20260610.302/embark.el
(defun embark--all-bindings (keymap &optional nested)
"Return an alist of all bindings in KEYMAP.
If NESTED is non-nil subkeymaps are not flattened."
(let (bindings maps)
(map-keymap
(lambda (key def)
(cond
((keymapp def)
(if nested
(push (cons (vector key) def) maps)
(dolist (bind (embark--all-bindings def))
(push (cons (vconcat (vector key) (car bind)) (cdr bind))
maps))))
(def (push (cons (vector key) def) bindings))))
(keymap-canonicalize keymap))
(nconc (nreverse bindings) (nreverse maps))))