Commit 54e7f3a981bd

Vincent Demeester <vincent@sbr.pm>
2021-04-23 14:26:06
emacs: fix custom-set-faces for modus 🧙
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 7e2eae2
Changed files (1)
tools
tools/emacs/early-init.el
@@ -57,20 +57,17 @@ This is used internally by `vde/modus-themes-toggle'."
   (modus-themes-load-operandi))
 
 (defun vde/modus-operandi-custom ()
-  "Customize modus-operandi theme"
-  ;; (if (member 'modus-operandi custom-enabled-themes)
-  ;;     (modus-operandi-theme-with-color-variables ; this macro allows us to access the colour palette
-  ;;      (custom-theme-set-faces
-  ;;       'modus-operandi
-  ;;       `(whitespace-tab ((,class (:background "#ffffff" :foreground "#cccccc"))))
-  ;;       `(whitespace-space ((,class (:background "#ffffff" :foreground "#cccccc"))))
-  ;;       `(whitespace-hspace ((,class (:background "#ffffff" :foreground "#cccccc"))))
-  ;;       `(whitespace-newline ((,class (:background "#ffffff" :foreground "#cccccc"))))
-  ;;       `(whitespace-indentation ((,class (:background "#ffffff" :foreground "#cccccc"))))
-  ;;       )))
-  )
+  "Customize modus-operandi theme."
+  (modus-themes-with-colors
+    (custom-set-faces
+     `(whitespace-tab ((,class (:background "#ffffff" :foreground "#cccccc"))))
+     `(whitespace-space ((,class (:background "#ffffff" :foreground "#cccccc"))))
+     `(whitespace-hspace ((,class (:background "#ffffff" :foreground "#cccccc"))))
+     `(whitespace-newline ((,class (:background "#ffffff" :foreground "#cccccc"))))
+     `(whitespace-indentation ((,class (:background "#ffffff" :foreground "#cccccc"))))
+     )))
 
-(add-hook 'contrib/after-load-theme-hook 'vde/modus-operandi-custom)
+(add-hook 'modus-themes-after-load-theme-hook #'vde/modus-operandi-custom)
 (vde/modus-operandi)
 
 (defconst font-height 130