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

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

[nongnu] elpa/autothemer e0b1c2c0ad 01/29: Add autothemer-let-palette


From: ELPA Syncer
Subject: [nongnu] elpa/autothemer e0b1c2c0ad 01/29: Add autothemer-let-palette
Date: Sun, 28 Aug 2022 22:58:36 -0400 (EDT)

branch: elpa/autothemer
commit e0b1c2c0adb3258ee37959f31dd94f7687b19671
Author: Jason Milkins <jasonm23@gmail.com>
Commit: Jason Milkins <jasonm23@gmail.com>

    Add autothemer-let-palette
---
 autothemer.el | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/autothemer.el b/autothemer.el
index 09660c5ded..3ac4636028 100644
--- a/autothemer.el
+++ b/autothemer.el
@@ -379,6 +379,17 @@ If PLIST is nil, ARGS are bound to BODY nil values."
   "Unindent string S marked with | chars."
   (replace-regexp-in-string "^ *|" "" s))
 
+;;; let palette...
+(defmacro autothemer-let-palette (&rest body)
+  "Provide a let block for BODY from `autothemer--current-theme'.
+
+Load/eval the required autothemer theme source (not
+byte-compiled) to set `autothemer--current-theme'."
+
+  `(let ,(--map (list (autothemer--color-name it) (autothemer--color-value it))
+                (autothemer--theme-colors autothemer--current-theme))
+     ,@body))
+
 ;;; SVG Palette generator...
 
 (defun autothemer-generate-palette-svg (&optional options)



reply via email to

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