Variable: apheleia-mode-predicates
apheleia-mode-predicates is a customizable variable defined in
apheleia-formatters.el.
Value
(apheleia-mhtml-mode-predicate)
Documentation
List of predicates that check for sneaky major modes.
Sometimes a major mode will set major-mode to something other
than itself, making it hard to correctly detect what major mode
is active. In such cases you can add a predicate to this list to
handle it. Predicates take no arguments, are run in the current
buffer, and should return the name of a mode if one is detected.
If all the predicates return nil, or if there aren't any in the
list, then only the value of major-mode is used to determine
the major mode. The detected major mode affects the selection
from apheleia-mode-alist.
Source Code
;; Defined in /nix/store/lwcwryzabcmvjcwwzzs65jrwf7p7d7cs-emacs-packages-deps/share/emacs/site-lisp/elpa/apheleia-20260915.1628/apheleia-formatters.el
;;;###autoload
(defcustom apheleia-mode-predicates '(apheleia-mhtml-mode-predicate)
"List of predicates that check for sneaky major modes.
Sometimes a major mode will set `major-mode' to something other
than itself, making it hard to correctly detect what major mode
is active. In such cases you can add a predicate to this list to
handle it. Predicates take no arguments, are run in the current
buffer, and should return the name of a mode if one is detected.
If all the predicates return nil, or if there aren't any in the
list, then only the value of `major-mode' is used to determine
the major mode. The detected major mode affects the selection
from `apheleia-mode-alist'."
:type '(repeat function)
:group 'apheleia)