Function: embark--default-action

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

Signature

(embark--default-action TYPE)

Documentation

Return default action for the given TYPE of target.

The most common case is that the target comes from minibuffer completion, in which case the default action is the command that opened the minibuffer in the first place. This can be overridden by embark-default-action-overrides.

For targets that do not come from minibuffer completion
(typically some thing at point in a regular buffer) and whose
type is not listed in embark-default-action-overrides, the default action is given by whatever binding RET has in the action keymap for the given type.

Source Code

;; Defined in ~/.emacs.d/elpa/embark-20260610.302/embark.el
(defun embark--default-action (type)
  "Return default action for the given TYPE of target.
The most common case is that the target comes from minibuffer
completion, in which case the default action is the command that
opened the minibuffer in the first place.  This can be overridden
by `embark-default-action-overrides'.

For targets that do not come from minibuffer completion
\(typically some thing at point in a regular buffer) and whose
type is not listed in `embark-default-action-overrides', the
default action is given by whatever binding RET has in the action
keymap for the given type."
  (or (alist-get (cons type embark--command) embark-default-action-overrides
                 nil nil #'equal)
      (alist-get type embark-default-action-overrides)
      (alist-get t embark-default-action-overrides)
      embark--command
      (lookup-key (embark--raw-action-keymap type) "\r")))