Function: auto-dark-toggle-appearance

auto-dark-toggle-appearance is an interactive and natively compiled function defined in auto-dark.el.

Signature

(auto-dark-toggle-appearance)

Documentation

Switch between light and dark mode.

If auto-dark-detection-method is nil, this will persist until the next time this is called. Otherwise, it could switch to the system appearance at any time.

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/fxsazwcy8jcsigjhcydkb81ip47xqcw0-emacs-packages-deps/share/emacs/site-lisp/elpa/auto-dark-20260313.2356/auto-dark.el
(defun auto-dark-toggle-appearance ()
  "Switch between light and dark mode.
If `auto-dark-detection-method' is nil, this will persist until the next time
this is called. Otherwise, it could switch to the system appearance at any
time."
  (interactive)
  (auto-dark--set-theme (if (eq auto-dark--last-dark-mode-state 'dark)
                            'light
                          ;; NB: This does _something_ even if we don’t know
                          ;;     what the previous state was, since the user
                          ;;     explicitly requested a change.
                          'dark)))