Function: magit-section--set-section-properties

magit-section--set-section-properties is a byte-compiled function defined in magit-section.el.

Signature

(magit-section--set-section-properties SECTION)

Source Code

;; Defined in ~/.emacs.d/elpa/magit-section-20260330.1102/magit-section.el
(defun magit-section--set-section-properties (section)
  (pcase-let* (((eieio start end children keymap) section)
               (props `( magit-section ,section
                         ,@(and$ (symbol-value keymap)
                                 (list 'keymap $)))))
    (if children
        (save-excursion
          (goto-char start)
          (while (< (point) end)
            (let ((next (or (next-single-property-change (point) 'magit-section)
                            end)))
              (unless (magit-section-at)
                (add-text-properties (point) next props))
              (goto-char next))))
      (add-text-properties start end props))))