branch: elpa/magit commit 503b8a94c2875bb84a7b01bc20a3109d6ca31599 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
magit-define-section-jumper: Support all modes with a section hook --- lisp/magit-section.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/magit-section.el b/lisp/magit-section.el index c46b55d56eb..28b937d1d22 100644 --- a/lisp/magit-section.el +++ b/lisp/magit-section.el @@ -908,7 +908,10 @@ With a prefix argument also expand it." heading) (list :description heading)) ,@(and inserter `(:if (##memq ',inserter - (bound-and-true-p magit-status-sections-hook)))) + (symbol-value + (intern (format "%s-sections-hook" + (substring (symbol-name major-mode) + 0 -5))))))) :inapt-if-not (##magit-get-section (cons (cons ',type ,value) (magit-section-ident magit-root-section)))