Function: magit-describe-section
magit-describe-section is an interactive and byte-compiled function
defined in magit-section.el.
Signature
(magit-describe-section SECTION &optional INTERACTIVE-P)
Documentation
Show information about the section at point.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/magit-section-20260330.1102/magit-section.el
(defun magit-describe-section (section &optional interactive-p)
"Show information about the section at point."
(interactive (list (magit-current-section) t))
(let ((inserter-section section))
(while (and inserter-section (not (oref inserter-section inserter)))
(setq inserter-section (oref inserter-section parent)))
(when (and inserter-section (oref inserter-section inserter))
(setq section inserter-section)))
(pcase (oref section inserter)
(`((,hook ,fun) . ,src-src)
(help-setup-xref `(magit-describe-section ,section) interactive-p)
(with-help-window (help-buffer)
(with-current-buffer standard-output
(insert (format-message
"%s\n is inserted by `%s'\n from `%s'"
(magit-describe-section-briefly section)
(make-text-button (symbol-name fun) nil
:type 'help-function
'help-args (list fun))
(make-text-button (symbol-name hook) nil
:type 'help-variable
'help-args (list hook))))
(pcase-dolist (`(,hook ,fun) src-src)
(insert (format-message
",\n called by `%s'\n from `%s'"
(make-text-button (symbol-name fun) nil
:type 'help-function
'help-args (list fun))
(make-text-button (symbol-name hook) nil
:type 'help-variable
'help-args (list hook)))))
(insert ".\n\n")
(insert
(format-message
"`%s' is "
(make-text-button (symbol-name fun) nil
:type 'help-function 'help-args (list fun))))
(describe-function-1 fun))))
(_ (message "%s, inserter unknown"
(magit-describe-section-briefly section)))))