Function: which-key--create-buffer-and-show

which-key--create-buffer-and-show is a byte-compiled function defined in which-key.el.gz.

Signature

(which-key--create-buffer-and-show &optional PREFIX-KEYS FROM-KEYMAP FILTER PREFIX-TITLE)

Documentation

Fill which-key--buffer with key descriptions and reformat.

Finally, show the buffer.

Source Code

;; Defined in /usr/src/emacs/lisp/which-key.el.gz
(defun which-key--create-buffer-and-show
    (&optional prefix-keys from-keymap filter prefix-title)
  "Fill `which-key--buffer' with key descriptions and reformat.
Finally, show the buffer."
  (let ((start-time (current-time))
        (formatted-keys (which-key--get-bindings
                         prefix-keys from-keymap filter))
        (prefix-desc (key-description prefix-keys)))
    (cond ((null formatted-keys)
           (message "%s-  which-key: There are no keys to show" prefix-desc))
          ((listp which-key-side-window-location)
           (setq which-key--last-try-2-loc
                 (apply #'which-key--try-2-side-windows
                        formatted-keys prefix-keys prefix-title
                        which-key-side-window-location)))
          (t (setq which-key--pages-obj
                   (which-key--create-pages
                    formatted-keys prefix-keys prefix-title))
             (which-key--show-page)))
    (which-key--debug-message
     "On prefix \"%s\" which-key took %.0f ms." prefix-desc
     (* 1000 (float-time (time-since start-time))))))