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: make defcustom automatically mark some variables as safe Date: Thu, 25 Oct 2007 21:18:14 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193361580 12146 80.91.229.12 (26 Oct 2007 01:19:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Oct 2007 01:19:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 26 03:19:42 2007 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.50) id 1IlDrR-0005Kh-EP for ged-emacs-devel@m.gmane.org; Fri, 26 Oct 2007 03:19:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlDr2-0001Ay-MR for ged-emacs-devel@m.gmane.org; Thu, 25 Oct 2007 21:19:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IlDqx-00018O-B3 for emacs-devel@gnu.org; Thu, 25 Oct 2007 21:19:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IlDqr-0000wc-LS for emacs-devel@gnu.org; Thu, 25 Oct 2007 21:19:10 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IlDqr-0000wN-AY for emacs-devel@gnu.org; Thu, 25 Oct 2007 21:19:05 -0400 Original-Received: from bc.sympatico.ca ([209.226.175.184] helo=tomts22-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IlDqM-0003R7-D8; Thu, 25 Oct 2007 21:18:36 -0400 Original-Received: from pastel.home ([74.12.207.144]) by tomts22-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20071026011814.QSOC18413.tomts22-srv.bellnexxia.net@pastel.home>; Thu, 25 Oct 2007 21:18:14 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 9D8EC7F62; Thu, 25 Oct 2007 21:18:14 -0400 (EDT) In-Reply-To: (Glenn Morris's message of "Thu\, 25 Oct 2007 00\:09\:27 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) 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:81733 Archived-At: > What do people think of the idea of changing defcustom to give > some variable types a safe-local-variable property by default? > I mean that, eg, defcustom'ing a variable of :type integer would do: > (put 'variable 'safe-local-variable 'integerp) > Similarly for :type boolean (booleanp), string and regexp (stringp), > and others where it makes sense. I think this is wrong: one of the main changes in Emacs-22 w.r.t file-local variables is that we made them safe: from no on, a file-local variable should never be blindly accepted if we're not "sure" that it's safe. So this would be a step backward since it would usually make good decisions but not always (e.g. `enable-local-eval' could very well have been defined with `:type boolean') so that would introduce security holes until someone notices them. Stefan