unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Yavuz <justloop@gmail.com>
To: emacs-devel@gnu.org
Subject: customize-themes doesn't allow backquote or :inherit
Date: Sun, 17 Oct 2010 18:47:29 +0000 (UTC)	[thread overview]
Message-ID: <loom.20101017T203133-734@post.gmane.org> (raw)

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




             reply	other threads:[~2010-10-17 18:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-17 18:47 Yavuz [this message]
2010-10-17 21:20 ` customize-themes doesn't allow backquote or :inherit 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20101017T203133-734@post.gmane.org \
    --to=justloop@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).