branch: externals/modus-themes
commit 68de71e7aa7f6811d4780b99b2cacb1a027129cc
Author: Protesilaos Stavrou <[email protected]>
Commit: Protesilaos Stavrou <[email protected]>

    Make modus-themes-with-colors only work when a theme is current
    
    We do not want to break the enable-theme-functions when it is called
    with any other non-Modus theme.
---
 modus-themes.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/modus-themes.el b/modus-themes.el
index 82ecd48435..a946ca2585 100644
--- a/modus-themes.el
+++ b/modus-themes.el
@@ -7299,12 +7299,12 @@ Consult the manual for details on how to build a theme 
on top of the
          ;; otherwise the macro does not work properly when called from
          ;; inside a function.
          (colors (mapcar #'car palette)))
-    `(let* ((c '((class color) (min-colors 256)))
-            (,sym (modus-themes-get-theme-palette nil :with-overrides 
:with-user-palette))
-            ,@(mapcar (lambda (color)
-                        (list color
-                              `(modus-themes--retrieve-palette-value ',color 
,sym)))
-                      colors))
+    `(when-let* ((c '((class color) (min-colors 256)))
+                 (,sym (modus-themes-get-theme-palette nil :with-overrides 
:with-user-palette))
+                 ,@(mapcar (lambda (color)
+                             (list color
+                                   `(modus-themes--retrieve-palette-value 
',color ,sym)))
+                           colors))
        (ignore c ,@colors) ; Silence unused variable warnings
        ,@body)))
 

Reply via email to