From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: theme and a question about creating them Date: Thu, 20 Jan 2011 10:46:21 -0500 Message-ID: References: <20101231155214.DE05339C1EA@djcbsoftware.nl> <87ipy7z8zd.fsf@stupidchicken.com> <87bp3rmbyk.fsf@stupidchicken.com> <87oc7jq9eq.fsf@gnu.org> <874o94ecrr.fsf@gnu.org> <87vd1kmg17.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1295538399 5538 80.91.229.12 (20 Jan 2011 15:46:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 20 Jan 2011 15:46:39 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 20 16:46:35 2011 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 1PfwiY-0002pJ-4k for ged-emacs-devel@m.gmane.org; Thu, 20 Jan 2011 16:46:34 +0100 Original-Received: from localhost ([127.0.0.1]:42436 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfwiX-0006Be-KX for ged-emacs-devel@m.gmane.org; Thu, 20 Jan 2011 10:46:33 -0500 Original-Received: from [140.186.70.92] (port=44972 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfwiO-0006AP-IW for emacs-devel@gnu.org; Thu, 20 Jan 2011 10:46:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PfwiN-0001Qg-Id for emacs-devel@gnu.org; Thu, 20 Jan 2011 10:46:24 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183]:13811 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PfwiN-0001NZ-Fl for emacs-devel@gnu.org; Thu, 20 Jan 2011 10:46:23 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAMLnN01FpZLq/2dsb2JhbACkUHS+Q4VQBIRvjjg X-IronPort-AV: E=Sophos;i="4.60,351,1291611600"; d="scan'208";a="88710228" Original-Received: from 69-165-146-234.dsl.teksavvy.com (HELO ceviche.home) ([69.165.146.234]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 20 Jan 2011 10:46:21 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id AE0F766102; Thu, 20 Jan 2011 10:46:21 -0500 (EST) In-Reply-To: <87vd1kmg17.fsf@stupidchicken.com> (Chong Yidong's message of "Wed, 19 Jan 2011 22:04:52 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:134822 Archived-At: >> It doesn't make much sense to run the theme through `unsafep' while >> marking `custom-theme-set-variables' and `custom-theme-set-faces' as >> "safe functions" (which they aren't). > A user who loads a theme would expects it to do *something*, so I'd > argue that those two functions should not be considered unsafe while > performing such an operation. But if it sets a hook to trigger a nuclear explosion, the user might be in for a nasty surprise. > If this really is a concern, how bout marking only > custom-theme-set-faces as safe? Then the user can be prompted for any > (non-built-in) theme that changes variables, but themes that only > fiddle with faces will be accepted. I guess that one could be safe, tho IIRC we can set :height to a function, so there's still a risk. Stefan