Commit 757a6f8036f4

Vincent Demeester <vincent@sbr.pm>
2020-05-14 13:31:00
config-appearance.el: fix custom-theme-set-faces
set custom--inhibit-theme-enalbe to nil to make sure those are taken into account. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent ffd5ed1
Changed files (1)
tools
tools/emacs/config/config-appearance.el
@@ -54,7 +54,8 @@
 ;; UseTheme
 (use-package emacs
   :config
-  (setq custom-safe-themes t)
+  (setq-default custom-safe-themes t)
+  (setq-default custom--inhibit-theme-enable nil)
 
   (defun sbr/before-load-theme (&rest args)
     "Clear existing theme settings instead of layering them.
@@ -110,17 +111,16 @@ This is used internally by `sbr/modus-themes-toggle'."
     (load-theme 'modus-operandi t))
   (defun sbr/modus-operandi-custom ()
     "Customize modus-operandi theme"
-    (message "fooo")
     (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"))))
-          ))))
+          (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"))))
+           ))))
   (add-hook 'contrib/after-load-theme-hook 'sbr/modus-operandi-custom)
   (sbr/modus-operandi))