From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: Risky local variable mechanism Date: Wed, 01 Feb 2006 23:17:12 -0500 Message-ID: References: <87mzhbly89.fsf-monnier+emacs@gnu.org> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1138854256 3864 80.91.229.2 (2 Feb 2006 04:24:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 2 Feb 2006 04:24:16 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 02 05:24:15 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F4W0z-0000O5-4U for ged-emacs-devel@m.gmane.org; Thu, 02 Feb 2006 05:24:13 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F4W44-00013U-SC for ged-emacs-devel@m.gmane.org; Wed, 01 Feb 2006 23:27:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F4VyJ-0006bp-Gu for emacs-devel@gnu.org; Wed, 01 Feb 2006 23:21:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F4VyI-0006bV-Ro for emacs-devel@gnu.org; Wed, 01 Feb 2006 23:21:27 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F4VyI-0006bP-KW for emacs-devel@gnu.org; Wed, 01 Feb 2006 23:21:26 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1F4Vx4-0003fq-Gz for emacs-devel@gnu.org; Wed, 01 Feb 2006 23:20:10 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1F4VuC-00064i-OT; Wed, 01 Feb 2006 23:17:12 -0500 Original-To: Stefan Monnier In-reply-to: <87mzhbly89.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Tue, 31 Jan 2006 19:37:42 -0500) 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:49910 Archived-At: I rarely use file-local variables, so it's hard for me to figure out which set of restrictions will be best. Using custom types sounds like a good idea, but note that setting "boolean" variables can be dangerous as well (e.g. enable-local-eval). That is a good point--but there are just a few variables which are dangerous in that way, and they already are marked. The big set of variables which are dangerous but not marked are those whose values can be functions to call. That is what I am hoping to recognize using custom types. Another idea: just check to see if the value is a function name, or if any function name (including lambda) appears in it. If so, the value is risky. That is quite simple and does not depend on knowing the custom type.