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

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

[nongnu] elpa/dracula-theme 943faed 187/187: Reduce eval call scope


From: ELPA Syncer
Subject: [nongnu] elpa/dracula-theme 943faed 187/187: Reduce eval call scope
Date: Thu, 21 Oct 2021 18:05:20 -0400 (EDT)

branch: elpa/dracula-theme
commit 943faeda66931dd275fe83d858945bd07abacc5a
Author: Étienne Deparis <etienne@depar.is>
Commit: Étienne Deparis <etienne@depar.is>

    Reduce eval call scope
---
 dracula-theme.el | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/dracula-theme.el b/dracula-theme.el
index 484fa22..64e27a8 100644
--- a/dracula-theme.el
+++ b/dracula-theme.el
@@ -769,21 +769,21 @@ read it before opening a new issue about your will.")
          'dracula
          (let ((expand-with-func
                 (lambda (func spec)
-                  (when (and (eq func 'caddr)
-                             dracula-use-24-bit-colors-on-256-colors-terms)
-                    (setq func 'cadr))
                   (let (reduced-color-list)
-                    (eval `(let ,(dolist (col colors reduced-color-list)
-                                   (push `(,(car col) ,(funcall func col))
-                                         reduced-color-list))
-                             (eval `(backquote ,spec)))))))
+                    (dolist (col colors reduced-color-list)
+                      (push (list (car col) (funcall func col))
+                            reduced-color-list))
+                    (eval `(let ,reduced-color-list
+                             (backquote ,spec))))))
                whole-theme)
            (pcase-dolist (`(,face . ,spec) faces)
              (push `(,face
                      ((((min-colors 16777216)) ; fully graphical envs
                        ,(funcall expand-with-func 'cadr spec))
                       (((min-colors 256))      ; terminal withs 256 colors
-                       ,(funcall expand-with-func 'caddr spec))
+                       ,(if dracula-use-24-bit-colors-on-256-colors-terms
+                            (funcall expand-with-func 'cadr spec)
+                          (funcall expand-with-func 'caddr spec)))
                       (t                       ; should be only tty-like envs
                        ,(funcall expand-with-func 'cadddr spec))))
                    whole-theme))



reply via email to

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