Function: majutsu-section-cycle
majutsu-section-cycle is an interactive and natively compiled function
defined in majutsu-section.el.
Signature
(majutsu-section-cycle SECTION)
Documentation
Cycle visibility of SECTION and its children.
Key Bindings
majutsu-mode-map C-<tab> majutsu-mode-map C-c TAB majutsu-mode-map M-<tab>
Source Code
;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-section.el
(defun majutsu-section-cycle (section)
"Cycle visibility of SECTION and its children."
(interactive (list (magit-current-section)))
(cond
((and (equal (this-command-keys) [C-tab])
(eq (global-key-binding [C-tab]) 'tab-next)
(fboundp 'tab-bar-switch-to-next-tab))
(tab-bar-switch-to-next-tab current-prefix-arg))
((eq section magit-root-section)
(majutsu-section-cycle-global))
((oref section hidden)
(majutsu-section-show section)
(majutsu-section-hide-children section))
((let ((children (oref section children)))
(and (seq-some (lambda (child) (oref child hidden)) children)
(seq-some (lambda (child) (oref child children)) children)))
(majutsu-section-show-headings section))
((seq-some #'magit-section-hidden-body (oref section children))
(majutsu-section-show-children section))
(t
(majutsu-section-hide section))))