From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yavuz Newsgroups: gmane.emacs.devel Subject: customize-themes doesn't allow backquote or :inherit Date: Sun, 17 Oct 2010 18:47:29 +0000 (UTC) Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1287341272 27105 80.91.229.12 (17 Oct 2010 18:47:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 17 Oct 2010 18:47:52 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 17 20:47:51 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P7YGs-0007mi-4y for ged-emacs-devel@m.gmane.org; Sun, 17 Oct 2010 20:47:50 +0200 Original-Received: from localhost ([127.0.0.1]:47059 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7YGr-0004g3-LH for ged-emacs-devel@m.gmane.org; Sun, 17 Oct 2010 14:47:49 -0400 Original-Received: from [140.186.70.92] (port=40306 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7YGl-0004ek-NB for emacs-devel@gnu.org; Sun, 17 Oct 2010 14:47:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7YGk-0003DC-Lo for emacs-devel@gnu.org; Sun, 17 Oct 2010 14:47:43 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:48461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7YGk-0003Cu-Ev for emacs-devel@gnu.org; Sun, 17 Oct 2010 14:47:42 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1P7YGg-0007hw-71 for emacs-devel@gnu.org; Sun, 17 Oct 2010 20:47:38 +0200 Original-Received: from 78.172.214.96 ([78.172.214.96]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Oct 2010 20:47:38 +0200 Original-Received: from justloop by 78.172.214.96 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Oct 2010 20:47:38 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 27 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 78.172.214.96 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b6) Gecko/20100101 Firefox/4.0b6) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:131786 Archived-At: 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