Function: which-key--show-keymap

which-key--show-keymap is a byte-compiled function defined in which-key.el.gz.

Signature

(which-key--show-keymap KEYMAP-NAME KEYMAP &optional PRIOR-ARGS ALL NO-PAGING FILTER)

Source Code

;; Defined in /usr/src/emacs/lisp/which-key.el.gz
(defun which-key--show-keymap
    (keymap-name keymap &optional prior-args all no-paging filter)
  (when prior-args (push prior-args which-key--prior-show-keymap-args))
  (let ((bindings (which-key--get-bindings nil keymap filter all)))
    (if (null bindings)
        (message "which-key: No bindings found in %s" keymap-name)
      (cond ((listp which-key-side-window-location)
             (setq which-key--last-try-2-loc
                   (apply #'which-key--try-2-side-windows
                          bindings nil keymap-name
                          which-key-side-window-location)))
            (t (setq which-key--pages-obj
                     (which-key--create-pages bindings nil keymap-name))
               (which-key--show-page)))
      (unless no-paging
        (let* ((key (read-key))
               (key-desc (key-description (list key)))
               (next-def (lookup-key keymap (vector key))))
          (cond ((and which-key-use-C-h-commands
                      (numberp key) (= key help-char))
                 (which-key-C-h-dispatch))
                ((keymapp next-def)
                 (which-key--hide-popup-ignore-command)
                 (which-key--show-keymap
                  (concat keymap-name " " key-desc)
                  next-def
                  (cons keymap-name keymap)))
                (t (which-key--hide-popup))))))))