branch: externals/modus-themes commit 39ac76907ca1ffb33167c72036b35814c07e9587 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Make 'modus-themes--current-theme' more robust The idea is to try to enable the Modus themes if they are "known". That way we do not encounter errors when we have loaded one of them but, say, try to fetch a value from another (such as with 'modus-themes-list-colors' and 'modus-themes-get-color-value'). --- modus-themes.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modus-themes.el b/modus-themes.el index bc4db0b714..5be82a5bdf 100644 --- a/modus-themes.el +++ b/modus-themes.el @@ -1076,7 +1076,8 @@ C1 and C2 are color values written in hexadecimal RGB." (defun modus-themes--current-theme () "Return first enabled Modus theme." - (car (modus-themes--list-enabled-themes))) + (car (or (modus-themes--list-enabled-themes) + (modus-themes--list-known-themes)))) (defun modus-themes--palette-symbol (theme &optional overrides) "Return THEME palette as a symbol.