Function: magit-menu-item

magit-menu-item is a byte-compiled function defined in magit-section.el.

Signature

(magit-menu-item DESC DEF &optional PROPS)

Documentation

Return a menu item named DESC binding DEF and using PROPS.

If DESC contains a supported %-spec, substitute the expression (magit-menu-format-desc DESC) for that. See magit-menu-format-desc.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-section-20260330.1102/magit-section.el
(defun magit-menu-item (desc def &optional props)
  "Return a menu item named DESC binding DEF and using PROPS.

If DESC contains a supported %-spec, substitute the
expression (magit-menu-format-desc DESC) for that.
See `magit-menu-format-desc'."
  `(menu-item
    ,(if (and (stringp desc) (string-match-p "%[tTvsmMx]" desc))
         (list 'magit-menu-format-desc desc)
       desc)
    ,def
    ;; Without this, the keys for point would be shown instead
    ;; of the relevant ones from where the click occurred.
    :keys ,(##magit--menu-position-keys def)
    ,@props))