Function: magit-section-siblings
magit-section-siblings is a byte-compiled function defined in
magit-section.el.
Signature
(magit-section-siblings SECTION &optional DIRECTION)
Documentation
Return a list of the sibling sections of SECTION.
If optional DIRECTION is prev, then return siblings that come
before SECTION. If it is next, then return siblings that come
after SECTION. For all other values, return all siblings
excluding SECTION itself.
Source Code
;; Defined in ~/.emacs.d/elpa/magit-section-20260330.1102/magit-section.el
(defun magit-section-siblings (section &optional direction)
"Return a list of the sibling sections of SECTION.
If optional DIRECTION is `prev', then return siblings that come
before SECTION. If it is `next', then return siblings that come
after SECTION. For all other values, return all siblings
excluding SECTION itself."
(and-let* ((parent (oref section parent))
(siblings (oref parent children)))
(pcase direction
('prev (cdr (member section (reverse siblings))))
('next (cdr (member section siblings)))
(_ (remq section siblings)))))