Function: which-key--get-bindings
which-key--get-bindings is a byte-compiled function defined in
which-key.el.gz.
Signature
(which-key--get-bindings &optional PREFIX KEYMAP FILTER RECURSIVE)
Documentation
Collect key bindings.
If KEYMAP is nil, collect from current buffer using the current key sequence as a prefix. Otherwise, collect from KEYMAP. FILTER is a function to use to filter the bindings. If RECURSIVE is non-nil, then bindings are collected recursively for all prefixes.
Source Code
;; Defined in /usr/src/emacs/lisp/which-key.el.gz
(defun which-key--get-bindings (&optional prefix keymap filter recursive)
"Collect key bindings.
If KEYMAP is nil, collect from current buffer using the current
key sequence as a prefix. Otherwise, collect from KEYMAP. FILTER
is a function to use to filter the bindings. If RECURSIVE is
non-nil, then bindings are collected recursively for all prefixes."
(let* ((unformatted
(cond ((keymapp keymap)
(which-key--get-keymap-bindings
keymap nil prefix filter recursive))
(keymap
(error "%s is not a keymap" keymap))
(t
(which-key--get-current-bindings prefix filter)))))
(when which-key-sort-order
(setq unformatted
(sort unformatted which-key-sort-order)))
(which-key--format-and-replace unformatted recursive)))