From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: customize-themes doesn't allow backquote or :inherit Date: Sun, 17 Oct 2010 17:20:25 -0400 Message-ID: <87y69wsehy.fsf@stupidchicken.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1287350437 29902 80.91.229.12 (17 Oct 2010 21:20:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 17 Oct 2010 21:20:37 +0000 (UTC) Cc: emacs-devel@gnu.org To: Yavuz Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 17 23:20:36 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 1P7aeh-0006eO-8b for ged-emacs-devel@m.gmane.org; Sun, 17 Oct 2010 23:20:35 +0200 Original-Received: from localhost ([127.0.0.1]:55286 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7aeg-0000KJ-U4 for ged-emacs-devel@m.gmane.org; Sun, 17 Oct 2010 17:20:34 -0400 Original-Received: from [140.186.70.92] (port=52124 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7aeb-0000KD-Uw for emacs-devel@gnu.org; Sun, 17 Oct 2010 17:20:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7aea-0005Qe-VO for emacs-devel@gnu.org; Sun, 17 Oct 2010 17:20:29 -0400 Original-Received: from pantheon-po26.its.yale.edu ([130.132.50.121]:34845) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7aea-0005QU-TS for emacs-devel@gnu.org; Sun, 17 Oct 2010 17:20:28 -0400 Original-Received: from furball (dhcp-14-171.harvard.edu [128.103.14.171]) (authenticated bits=0) by pantheon-po26.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o9HLKPGR006773 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 17 Oct 2010 17:20:25 -0400 Original-Received: by furball (Postfix, from userid 1000) id EA7B4160A31; Sun, 17 Oct 2010 17:20:25 -0400 (EDT) In-Reply-To: (Yavuz's message of "Sun, 17 Oct 2010 18:47:29 +0000 (UTC)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 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:131790 Archived-At: Yavuz writes: > 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? This is worth discussing. Currently, the code only evals custom-theme-set-variables/faces if its arguments are quoted. I was concerned about security implications; the worry is that users may not be aware that loading a theme can execute arbitrary code. If people think this worry is unwarranted, I can change it to omit that check. Or, we can prompt the user if Emacs encounters a non-trivial form in the custom theme file. What's everyone's opinion?