emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/modus-themes 39ac76907c: Make 'modus-themes--current-th


From: ELPA Syncer
Subject: [elpa] externals/modus-themes 39ac76907c: Make 'modus-themes--current-theme' more robust
Date: Fri, 17 Feb 2023 06:58:05 -0500 (EST)

branch: externals/modus-themes
commit 39ac76907ca1ffb33167c72036b35814c07e9587
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]