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: risky local variable mechanism Date: Mon, 13 Feb 2006 16:03:28 -0500 Message-ID: <87r767ug2n.fsf@stupidchicken.com> References: <200602101313.13663.jyavner@member.fsf.org> <87accxlt6z.fsf@stupidchicken.com> <200602111527.31031.jyavner@member.fsf.org> <87hd757he0.fsf@stupidchicken.com> <87vevkmk1e.fsf@stupidchicken.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1139864567 1699 80.91.229.2 (13 Feb 2006 21:02:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 13 Feb 2006 21:02:47 +0000 (UTC) Cc: jyavner@member.fsf.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 13 22:02:43 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 1F8kps-0006Us-4F for ged-emacs-devel@m.gmane.org; Mon, 13 Feb 2006 22:02:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F8kpr-0002Bv-5h for ged-emacs-devel@m.gmane.org; Mon, 13 Feb 2006 16:02:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F8kpc-00028k-CX for emacs-devel@gnu.org; Mon, 13 Feb 2006 16:02:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F8kpa-000287-SN for emacs-devel@gnu.org; Mon, 13 Feb 2006 16:02:00 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F8kpa-00027u-Nu for emacs-devel@gnu.org; Mon, 13 Feb 2006 16:01:58 -0500 Original-Received: from [18.19.6.82] (helo=localhost.localdomain) by monty-python.gnu.org with esmtp (Exim 4.52) id 1F8ku3-0008Ew-8P; Mon, 13 Feb 2006 16:06:35 -0500 Original-Received: by localhost.localdomain (Postfix, from userid 1000) id B78D4120911; Mon, 13 Feb 2006 16:03:28 -0500 (EST) Original-To: rms@gnu.org In-Reply-To: (Richard M. Stallman's message of "Mon, 13 Feb 2006 15:05:13 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:50482 Archived-At: > it is not clearly right for unsafep to reject binding all variables > that would be rejected in a local variables list, given that unsafep > can detect giving functions as values. The commentary section of unsafep.el says: ;; A temporary binding is unsafe if its symbol: ;; 1. Has the `risky-local-variable' property. ;; 2. Has a name that ends with -command, font-lock-keywords(-[0-9]+)?, ;; font-lock-syntactic-keywords, -form, -forms, -frame-alist, -function, ;; -functions, -history, -hook, -hooks, -map, -map-alist, -mode-alist, ;; -predicate, or -program. This is exactly the definition of risky variables in my patch. In fact, the *current* definition of risky-local-variable-p does not match this definition exactly, since it also checks `safe-local-property'. (The way it checks it is rather inconsistent, BTW, there is no way to distinguish between VAL=nil meaning "any value of the variable" and VAL=nil meaning "the value nil is supplied" when `safe-local-property' is a function. So if unsafep.el relied on this, it was relying on a bug). Maybe the commentary section of unsafep.el is wrong, and the latter definition is intended. But according to the docstring of `unsafep-variable', it is supposed to detect if a variable is "safe as a let-binding" -- no mention of file local variables there. To clarify this issue, I'd like to ask: what's the specific goal of unsafep.el? Can anyone come up with a precise example of a problem with using unsafep.el resulting from the proposed changes to the file local variables code? With a specific example, we can look into how to adapt unsafep.el; otherwise, we're just going around in circles. (Since SES seems to be the only package that uses unsafep.el, it looks like the example will have to come from there.)