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

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

[elpa] externals/ef-themes fd05681d70 3/3: Harden ef-themes--current-the


From: ELPA Syncer
Subject: [elpa] externals/ef-themes fd05681d70 3/3: Harden ef-themes--current-theme conditionality
Date: Mon, 22 Aug 2022 22:57:32 -0400 (EDT)

branch: externals/ef-themes
commit fd05681d703e4bc3e82fe8a25f4cadd6ffe9ed93
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Harden ef-themes--current-theme conditionality
---
 ef-themes.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ef-themes.el b/ef-themes.el
index 70dba557f5..2bc667b867 100644
--- a/ef-themes.el
+++ b/ef-themes.el
@@ -319,8 +319,10 @@ sequence given SEQ-PRED, using SEQ-DEFAULT as a fallback."
 
 (defun ef-themes--current-theme ()
   "Return first enabled Ef theme."
-  (when-let* ((themes (ef-themes--list-enabled-themes)))
-    (car themes)))
+  (when-let* ((theme (car custom-enabled-themes)))
+    (if (memq theme (ef-themes--list-enabled-themes))
+        theme
+      (user-error "`%s' is not an Ef theme" theme))))
 
 (defun ef-themes--palette (theme)
   "Return THEME palette as a symbol."



reply via email to

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