Function: magit-section-value-if
magit-section-value-if is a byte-compiled function defined in
magit-section.el.
Signature
(magit-section-value-if CONDITION &optional SECTION)
Documentation
If the section at point matches CONDITION, then return its value.
If optional SECTION is non-nil then test whether that matches instead. If there is no section at point and SECTION is nil, then return nil. If the section does not match, then return nil.
See magit-section-match for the forms CONDITION can take.
Source Code
;; Defined in ~/.emacs.d/elpa/magit-section-20260330.1102/magit-section.el
(defun magit-section-value-if (condition &optional section)
"If the section at point matches CONDITION, then return its value.
If optional SECTION is non-nil then test whether that matches
instead. If there is no section at point and SECTION is nil,
then return nil. If the section does not match, then return
nil.
See `magit-section-match' for the forms CONDITION can take."
(and$ (or section (magit-current-section))
(and (magit-section-match condition $)
(oref $ value))))