Function: embark-prefix-help-command

embark-prefix-help-command is an autoloaded, interactive and byte-compiled function defined in embark.el.

Signature

(embark-prefix-help-command)

Documentation

Prompt for and run a command bound in the prefix used for this command.

The prefix described consists of all but the last event of the key sequence that ran this command. This function is intended to be used as a value for prefix-help-command; when used that way you can press help-char (by default C-h) after a key binding prefix to be prompted for a command under the prefix to run.

In addition to using completion to select a command, you can also type the embark-keymap-prompter-key (@ by default) and then the key binding (without the prefix).

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/embark-20260610.302/embark.el
;;;###autoload
(defun embark-prefix-help-command ()
  "Prompt for and run a command bound in the prefix used for this command.
The prefix described consists of all but the last event of the key
sequence that ran this command.  This function is intended to be used as
a value for `prefix-help-command'; when used that way you can press
`help-char' (by default C-h) after a key binding prefix to be prompted
for a command under the prefix to run.

In addition to using completion to select a command, you can also type
the `embark-keymap-prompter-key' (@ by default) and then the key
binding (without the prefix)."
  (interactive)
  (when-let* ((keys (this-command-keys-vector))
              (prefix (if (and (> (length keys) 0)
                               (eql (aref keys (1- (length keys))) help-char))
                          (seq-take keys (1- (length keys)))
                        keys))
              (keymap (key-binding prefix 'accept-default)))
    (minibuffer-with-setup-hook
        (lambda ()
          (let ((pt (- (minibuffer-prompt-end) 2)))
            (overlay-put (make-overlay pt pt) 'before-string
                         (format " under %s" (key-description prefix)))))
      (embark-bindings-in-keymap keymap))))