diff --git a/core/autoload/themes.el b/core/autoload/themes.el index dd5abac85..c44be01fc 100644 --- a/core/autoload/themes.el +++ b/core/autoload/themes.el @@ -54,11 +54,20 @@ doom-themes' API without worry." ;;;###autoload (defun doom/reload-theme () - "Reload the current color theme." + "Reload the current Emacs theme." (interactive) + (unless doom-theme + (user-error "No theme is active")) (let ((themes (copy-sequence custom-enabled-themes))) - (load-theme doom-theme t) + (mapc #'disable-theme custom-enabled-themes) + (let (doom-load-theme-hook) + (mapc #'enable-theme (reverse themes))) + (doom-run-hooks 'doom-load-theme-hook) (doom/reload-font) (message "%s %s" - (propertize "Reloaded themes:" 'face 'bold) + (propertize + (format "Reloaded %d theme%s:" + (length themes) + (if (cdr themes) "s" "")) + 'face 'bold) (mapconcat #'prin1-to-string themes ", "))))