Variable: apheleia-global-mode
apheleia-global-mode is a customizable variable defined in
apheleia.el.
Value
nil
Documentation
Non-nil if Apheleia-Global mode is enabled.
See the apheleia-global-mode(var)/apheleia-global-mode(fun) command
for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node (emacs)Easy Customization)
or call the function apheleia-global-mode(var)/apheleia-global-mode(fun).
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/lwcwryzabcmvjcwwzzs65jrwf7p7d7cs-emacs-packages-deps/share/emacs/site-lisp/elpa/apheleia-20260915.1628/apheleia.el
;; Use `progn' to force the entire minor mode definition to be copied
;; into the autoloads file, so that the minor mode can be enabled
;; without pulling in all of Apheleia during init.
;;;###autoload
(progn
(define-minor-mode apheleia-mode
"Minor mode for reformatting code on save without moving point.
It is customized by means of the variables `apheleia-mode-alist'
and `apheleia-formatters'."
:lighter apheleia-mode-lighter
(if apheleia-mode
(add-hook 'after-save-hook #'apheleia-format-after-save nil 'local)
(remove-hook 'after-save-hook #'apheleia-format-after-save 'local)))
(defvar-local apheleia-inhibit nil
"Do not enable `apheleia-mode' automatically if non-nil.
This is designed for use in .dir-locals.el.
See also `apheleia-inhibit-functions'.")
(put 'apheleia-inhibit 'safe-local-variable #'booleanp)
(defun apheleia-mode-maybe ()
"Enable `apheleia-mode' if allowed by user configuration.
This checks `apheleia-inhibit-functions' and `apheleia-inhibit'
to see if it is allowed."
(unless (or
apheleia-inhibit
(run-hook-with-args-until-success
'apheleia-inhibit-functions))
(apheleia-mode)))
(define-globalized-minor-mode apheleia-global-mode
apheleia-mode apheleia-mode-maybe
:group 'apheleia)
(put 'apheleia-mode 'safe-local-variable #'booleanp))