unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* customize-themes doesn't allow backquote or :inherit
@ 2010-10-17 18:47 Yavuz
  2010-10-17 21:20 ` Chong Yidong
  0 siblings, 1 reply; 7+ messages in thread
From: Yavuz @ 2010-10-17 18:47 UTC (permalink / raw)
  To: emacs-devel

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




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-10-18 20:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-17 18:47 customize-themes doesn't allow backquote or :inherit Yavuz
2010-10-17 21:20 ` Chong Yidong
2010-10-17 21:30   ` Miles Bader
2010-10-18 13:52   ` Stefan Monnier
2010-10-18 16:26     ` Chong Yidong
2010-10-18 17:54       ` Yavuz
2010-10-18 20:30         ` David De La Harpe Golden

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).