Function: embark--action-command

embark--action-command is a byte-compiled function defined in embark.el.

Signature

(embark--action-command ACTION)

Documentation

Turn an ACTION into a command to perform the action.

Returns the name of the command.

Source Code

;; Defined in ~/.emacs.d/elpa/embark-20260610.302/embark.el
(defun embark--action-command (action)
  "Turn an ACTION into a command to perform the action.
Returns the name of the command."
  (let ((name (intern (format "embark-action--%s"
                              (embark--command-name action)))))
    (fset name (lambda (arg)
                 (interactive "P")
                 (when-let* ((target (embark-collect--target)))
                   (let ((prefix-arg arg))
                     (embark--act action target)))))
    (when (fboundp action)
      (put name 'function-documentation (documentation action)))
    name))