3 Enable and load

NOTE that Emacs can load multiple themes, which typically produces undesirable results and undoes the work of the designer. Use the disable-theme command if you are trying other themes beside the Modus collection (Option for disabling other themes while loading Modus).

Users of the built-in themes cannot require the package as usual because there is no package to speak of. Instead, things are simpler as built-in themes are considered safe. All one needs is to load the theme of their preference by adding either form to their init file:

(load-theme 'modus-operandi)            ; Light theme
(load-theme 'modus-vivendi)             ; Dark theme

Remember that there are multiple Modus themes (Overview). Adapt the above snippet accordingly.

Users of packaged variants of the themes must add a few more lines to ensure that everything works as intended. First, one has to require the main library before loading one of the themes:

(require 'modus-themes)

One can activate a theme with something like the following expression, replacing modus-operandi with their preferred Modus theme:

(load-theme 'modus-operandi :no-confirm)

Changes to the available customization options must always be evaluated before loading a theme (Customization Options). Reload a theme for new changes to take effect.

This is how a basic setup could look like (The require-theme for built-in Emacs themes):

;;; For the built-in themes which cannot use `require'.
(require-theme 'modus-themes)

;; Add all your customizations prior to loading the themes.
(setq modus-themes-italic-constructs t
      modus-themes-bold-constructs nil)

;; Load the theme of your choice.
(load-theme 'modus-operandi)

;; Optionally define a key to switch between Modus themes.  Also check
;; the user option `modus-themes-to-toggle'.
(define-key global-map (kbd "<f5>") #'modus-themes-toggle)



;;; For packaged versions which must use `require'.

(require 'modus-themes)

;; Add all your customizations prior to loading the themes
(setq modus-themes-italic-constructs t
      modus-themes-bold-constructs nil)

;; Load the theme of your choice.
(load-theme 'modus-operandi :no-confirm)

(define-key global-map (kbd "<f5>") #'modus-themes-toggle)

Sample configuration with and without use-package.

To disable other themes before loading a Modus theme, use something like this:

(mapc #'disable-theme custom-enabled-themes)
(load-theme 'modus-operandi :no-confirm)

Instead of using the basic load-theme function, users can rely on the modus-themes-load-theme. It accepts a single argument, which is a symbol representing the Modus theme of choice, such as:

(modus-themes-load-theme 'modus-operandi)

The modus-themes-load-theme takes care to disable other themes, if the user opts in (Option for disabling other themes while loading Modus). After loading the theme of choice, this function calls the hook modus-themes-after-load-theme-hook (alias modus-themes-post-load-hook). Users can add their own functions to this hook to make further customizations (Advanced customization).

The commands modus-themes-toggle and modus-themes-select use modus-themes-load-theme internally (Option for which themes to toggle). The aforementioned hold true for them as well.