Function: which-key-undo-key

which-key-undo-key is an autoloaded, interactive and byte-compiled function defined in which-key.el.gz.

Signature

(which-key-undo-key &optional _)

Documentation

Undo last keypress and force which-key update.

Key Bindings

Aliases

which-key-undo

Source Code

;; Defined in /usr/src/emacs/lisp/which-key.el.gz
;;;###autoload
(defun which-key-undo-key (&optional _)
  "Undo last keypress and force which-key update."
  (interactive)
  (let* ((key-lst (butlast (which-key--current-key-list)))
         (which-key-inhibit t))
    (cond (which-key--prior-show-keymap-args
           (if (keymapp (cdr (car-safe which-key--prior-show-keymap-args)))
               (let ((args (pop which-key--prior-show-keymap-args)))
                 (which-key--show-keymap (car args) (cdr args)))
             (which-key--hide-popup)))
          (key-lst
           (which-key-reload-key-sequence key-lst)
           (which-key--create-buffer-and-show (apply #'vector key-lst)))
          (t (setq which-key--automatic-display nil)
             (which-key-show-top-level)))))