diff --git a/core/autoload/themes.el b/core/autoload/themes.el index 13ec82643..bed7c4f37 100644 --- a/core/autoload/themes.el +++ b/core/autoload/themes.el @@ -34,7 +34,12 @@ all themes. It will apply to all themes once they are loaded." (apply #'custom-theme-set-faces theme (mapcan #'doom--custom-theme-set-face (list ,@specs))))))) - (unless doom-theme (funcall #',fn)) + ;; Apply the changes immediately if the user is using the default theme + ;; or the theme has already loaded. This allows you to evaluate these + ;; macros on the fly and customize your faces iteratively. + (when (or (get 'doom-theme 'previous-themes) + (null doom-theme)) + (funcall #',fn)) ;; TODO Append to `doom-load-theme-hook' with DEPTH instead when Emacs ;; 26.x support is dropped. (add-hook 'doom-customize-theme-hook #',fn 'append)))) diff --git a/core/core-ui.el b/core/core-ui.el index c996f0532..cc1851e97 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -634,13 +634,15 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original ;; buffer-local face remaps (by `mixed-pitch-mode', for instance) won't ;; interfere with recalculating faces in new themes. (with-temp-buffer - ;; Disable previous themes so there are no conflicts. If you truly want - ;; multiple themes enabled, then use `enable-theme' instead. - (mapc #'disable-theme custom-enabled-themes) - (prog1 (funcall orig-fn theme no-confirm no-enable) - (when (and (not no-enable) (custom-theme-enabled-p theme)) - (setq doom-theme theme) - (doom-run-hooks 'doom-load-theme-hook))))) + (let ((last-themes (copy-sequence custom-enabled-themes))) + ;; Disable previous themes so there are no conflicts. If you truly want + ;; multiple themes enabled, then use `enable-theme' instead. + (mapc #'disable-theme custom-enabled-themes) + (prog1 (funcall orig-fn theme no-confirm no-enable) + (when (and (not no-enable) (custom-theme-enabled-p theme)) + (setq doom-theme theme) + (put 'doom-theme 'previous-themes last-themes) + (doom-run-hooks 'doom-load-theme-hook)))))) ;;