Function: apheleia--get-mode-chain
apheleia--get-mode-chain is a natively compiled function defined in
apheleia-formatters.el.
Signature
(apheleia--get-mode-chain)
Documentation
Return list of major modes in current buffer.
This is a list starting with major-mode and followed by its
parents, if any.
Source Code
;; Defined in /nix/store/lwcwryzabcmvjcwwzzs65jrwf7p7d7cs-emacs-packages-deps/share/emacs/site-lisp/elpa/apheleia-20260915.1628/apheleia-formatters.el
(defun apheleia--get-mode-chain ()
"Return list of major modes in current buffer.
This is a list starting with `major-mode' and followed by its
parents, if any."
(let ((modes (list major-mode)))
(while (get (car modes) 'derived-mode-parent)
(push (get (car modes) 'derived-mode-parent) modes))
(nreverse modes)))