Function: magit-section-maybe-add-heading-map

magit-section-maybe-add-heading-map is a byte-compiled function defined in magit-section.el.

Signature

(magit-section-maybe-add-heading-map SECTION)

Source Code

;; Defined in ~/.emacs.d/elpa/magit-section-20260330.1102/magit-section.el
(defun magit-section-maybe-add-heading-map (section)
  (when (magit-section-content-p section)
    (let ((start (oref section start))
          (map (oref section keymap)))
      (when (symbolp map)
        (setq map (symbol-value map)))
      (put-text-property
       start
       (magit--eol-position start)
       'keymap (if map
                   (make-composed-keymap
                    (list map magit-section-heading-map))
                 magit-section-heading-map)))))