branch: elpa/autothemer commit e0b1c2c0adb3258ee37959f31dd94f7687b19671 Author: Jason Milkins <jason...@gmail.com> Commit: Jason Milkins <jason...@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)