The reason we recommend load-theme
instead of the other option of
enable-theme
is that the former does a kind of “reset” on the face
specs. It quite literally loads (or reloads) the theme. Whereas the
latter simply puts an already loaded theme at the top of the list of
enabled items, re-using whatever state was last loaded.
As such, load-theme
reads all customizations that may happen during
any given Emacs session: even after the initial setup of a theme.
Examples are calls to custom-set-faces
, as well as new values assigned
to the options the Modus themes provide (Customization Options).
Our tests show that enable-theme
does not read such variables anew, so
it might appear to the unsuspecting user that the themes are somehow
broken whenever they try to assign a new value to a customization option
or some face.
This “reset” that load-theme
brings about does, however, come at the
cost of being somewhat slower than enable-theme
. Users who have a
stable setup and who seldom update their variables during a given Emacs
session, are better off using something like this:
(require 'modus-themes) (load-theme 'modus-operandi t t) (load-theme 'modus-vivendi t t) (enable-theme 'modus-operandi) ;; OR (enable-theme 'modus-vivendi)
Toggle themes without reloading them.
Sample configuration with and without use-package.
With the above granted, other sections of the manual discuss how to
configure custom faces, where load-theme
is expected, though
enable-theme
could still apply in stable setups: