Skip to content

The require-theme for built-in Emacs themes

The version of the Modus themes that is included in Emacs CANNOT use the standard require. This is because the built-in themes are not included in the load-path (not my decision). The require-theme function must be used in this case as a replacement. For example:

emacs-lisp
(require-theme 'modus-themes)

;; All customizations here
(setq modus-themes-bold-constructs t
      modus-themes-italic-constructs t)

;; Maybe define some palette overrides, such as by using our presets
(setq modus-themes-common-palette-overrides
      modus-themes-preset-overrides-intense)

;; Load the theme of choice (built-in themes are always "safe" so they
;; do not need the `no-require' argument of `load-theme').
(load-theme 'modus-operandi)

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