:after -> :after-while for load-theme advice

The advice shouldn't run if load-theme doesn't return
non-nil (indicating it succeeded).
This commit is contained in:
Henrik Lissner 2019-07-25 01:50:33 +02:00
parent b1b2eba984
commit 4299da1eb8
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -622,7 +622,7 @@ Fonts are specified by `doom-font', `doom-variable-pitch-font',
(defadvice! doom--run-load-theme-hooks-a (theme &optional _no-confirm no-enable) (defadvice! doom--run-load-theme-hooks-a (theme &optional _no-confirm no-enable)
"Set up `doom-load-theme-hook' to run after `load-theme' is called." "Set up `doom-load-theme-hook' to run after `load-theme' is called."
:after #'load-theme :after-while #'load-theme
(unless no-enable (unless no-enable
(setq doom-theme theme) (setq doom-theme theme)
(run-hooks 'doom-load-theme-hook))) (run-hooks 'doom-load-theme-hook)))