Issue
The doom-color function retrieves wrong colors when reverting color theme to previously-loaded doom-theme with consult-theme
Steps to reproduce
- Load a theme
doom-theme-1with any method - Load another (unloaded) theme
doom-theme-2withconsult-theme - Select
doom-theme-1again withconsult-theme - The value of
doom-themes--colorswill reflect the palette ofdoom-theme-2instead of the activedoom-theme-1, makingdoom-colorreturn wrong results.
Hacky fix
This problem does not occur using the :ivy and :helm completion modules, so I believe it to be an upstream problem with consult.
I’ve localized the issue to the following expression in consult-theme:
...
(if (custom-theme-p theme)
(enable-theme theme)
(load-theme theme :no-confirm)))))
;; end of defun
It seems that the issue can be fixed by replacing this with
...
(when theme
(load-theme theme :no-confirm))
via an :override advice where the rest of the consult-theme function is the same.