[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
customize-themes doesn't allow backquote or :inherit
From: |
Yavuz |
Subject: |
customize-themes doesn't allow backquote or :inherit |
Date: |
Sun, 17 Oct 2010 18:47:29 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Hello,
I have been trying out the customize-themes feature, and converting a
color-theme that I have to the new format. The problem I have is how to use
color variables instead of "#RRGGBB" type constants to ease design and
maintenance of themes. Initially I thought I could use something like:
(deftheme mytheme)
...
(defvar nice-color "#123456")
...
(custom-theme-set-faces 'mytheme
`(default ((t (:foreground ,nice-color))))
...)
(provide-theme 'mytheme)
However, it seems that the load-theme function in custom.el has some code that
checks for the presence of 'quote and throws a 'Unsafe expression in theme
settings' error if I try to use ` instead of '.
Being an elisp newbie, my attempts to bypass is with various combinations of
eval, apply, and `' ended in failure.
Is there a way to use variables in custom-theme-set-faces? Or is that check
really need to be that strict? Maybe backquote would be acceptable as well?
Thanks in advance,
Yavuz
- customize-themes doesn't allow backquote or :inherit,
Yavuz <=