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

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

[elpa] externals/ef-themes e5e8ada5bb 2/3: Fix palette reification in ef


From: ELPA Syncer
Subject: [elpa] externals/ef-themes e5e8ada5bb 2/3: Fix palette reification in ef-themes-with-colors
Date: Mon, 22 Aug 2022 22:57:32 -0400 (EDT)

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

    Fix palette reification in ef-themes-with-colors
---
 ef-themes.el | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/ef-themes.el b/ef-themes.el
index 52a52d212d..70dba557f5 100644
--- a/ef-themes.el
+++ b/ef-themes.el
@@ -330,7 +330,7 @@ sequence given SEQ-PRED, using SEQ-DEFAULT as a fallback."
 (defun ef-themes--current-theme-palette ()
   "Return palette of active Ef theme, else produce `user-error'."
   (if-let* ((palette (ef-themes--palette (ef-themes--current-theme))))
-      palette
+      (symbol-value palette)
     (user-error "No enabled Ef theme could be found")))
 
 (defvar ef-themes--select-theme-history nil)
@@ -1477,10 +1477,14 @@ Those are stored in `ef-themes-faces' and
   "Evaluate BODY with colors from current palette bound."
   (declare (indent 0))
   (let* ((sym (gensym))
-         (palette (ef-themes--current-theme-palette))
-         (colors (mapcar #'car (symbol-value palette))))
+         ;; NOTE 2022-08-23: We just give it a sample palette at this
+         ;; stage.  It only needs to collect each car.  Then we
+         ;; instantiate the actual theme's palette.  We have to do this
+         ;; otherwise the macro does not work properly when called from
+         ;; inside a function.
+         (colors (mapcar #'car (symbol-value 'ef-light-palette))))
     `(let* ((c '((class color) (min-colors 256)))
-            (,sym ,palette)
+            (,sym (ef-themes--current-theme-palette))
             ,@(mapcar (lambda (color)
                         (list color
                               `(let* ((value (car (alist-get ',color ,sym))))



reply via email to

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