-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ef-themes-with-colors throws error #11
Comments
Thank @stevemolitor! Your assessment is correct. I need to think about an elegant way to do this. Will think about it some more and report back to you. |
Maybe you can try this diff? ef-themes.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ef-themes.el b/ef-themes.el
index 9a60504..377935c 100644
--- a/ef-themes.el
+++ b/ef-themes.el
@@ -1518,7 +1518,7 @@ (defmacro ef-themes-with-colors (&rest body)
;; 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))))
+ (colors (mapcar #'car (ef-themes--current-theme-palette))))
`(let* ((c '((class color) (min-colors 256)))
(,sym (ef-themes--current-theme-palette))
,@(mapcar (lambda (color) I tested it with these: (defun testing-ef-themes-with-colors ()
(ef-themes-with-colors
(list bg-main)))
;; Evaluate these, change theme and eval again to see if you get a
;; different value:
(ef-themes-with-colors (list bg-main))
(testing-ef-themes-with-colors) |
@protesilaos I can confirm that your diff above fixes the issue. Thanks again! |
protesilaos
added a commit
that referenced
this issue
Aug 30, 2022
Thanks to Steve Molitor for telling me that the previous design would not work if 'ef-light' was not loaded. This was done in issue 11 at the GitHub mirror: <#11>.
Thank you! Just pushed the change. Closing this now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Executing the example code in section "9. Use colors from the active Ef theme":
Gives this error:
The error happens here. It seems to have been introduced in this commit: e5e8ada. The ef-light-pallette constant has not been defined yet apparently.
If I select the
ef-light-theme
first then it works fine (which makes sense).The text was updated successfully, but these errors were encountered: