From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Davis Herring Newsgroups: gmane.emacs.devel Subject: Re: The `risky-local-variable' blacklist Date: Tue, 31 Aug 2004 17:18:16 -0600 (MDT) Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1093994343 24267 80.91.224.253 (31 Aug 2004 23:19:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Aug 2004 23:19:03 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 01 01:18:56 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C2Htv-0007Qf-00 for ; Wed, 01 Sep 2004 01:18:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C2Hyo-0005cn-Ko for ged-emacs-devel@m.gmane.org; Tue, 31 Aug 2004 19:23:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C2HyZ-0005cS-VS for emacs-devel@gnu.org; Tue, 31 Aug 2004 19:23:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C2HyY-0005bs-3J for emacs-devel@gnu.org; Tue, 31 Aug 2004 19:23:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C2HyX-0005ba-Vl for emacs-devel@gnu.org; Tue, 31 Aug 2004 19:23:42 -0400 Original-Received: from [192.65.95.54] (helo=mailwasher-b.lanl.gov) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1C2HtK-0003le-5n for emacs-devel@gnu.org; Tue, 31 Aug 2004 19:18:21 -0400 Original-Received: from mailrelay2.lanl.gov (localhost.localdomain [127.0.0.1]) by mailwasher-b.lanl.gov (8.12.10/8.12.10/(ccn-5)) with ESMTP id i7VNIG6U024833 for ; Tue, 31 Aug 2004 17:18:16 -0600 Original-Received: from x-mail.lanl.gov (localhost.localdomain [127.0.0.1]) by mailrelay2.lanl.gov (8.12.10/8.12.10/(ccn-5)) with ESMTP id i7VNIGVU005296; Tue, 31 Aug 2004 17:18:16 -0600 Original-Received: from x-mail.lanl.gov (localhost.localdomain [127.0.0.1]) by x-mail.lanl.gov (8.12.10/8.12.10/(ccn-5)) with ESMTP id i7VNIGu6028740; Tue, 31 Aug 2004 17:18:16 -0600 Original-Received: from localhost (herring@localhost) by x-mail.lanl.gov (8.12.10/8.12.10/Submit) with ESMTP id i7VNIG13028736; Tue, 31 Aug 2004 17:18:16 -0600 X-Authentication-Warning: x-mail.lanl.gov: herring owned process doing -bs Original-To: Stefan In-Reply-To: X-Scanned-By: MIMEDefang 2.35 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:26668 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26668 > You do not understand. I was speaking very specifically about the > timeclock-mode-string. My comments only apply to variables used as > mode-line-string. Ah -- the actual mode-line, not the "line in a file that sets the mode". Oops. > I don't think you understand the reason why timeclock-mode-string was not > dangerous before: timeclock-mode-string can have a value of the form > (:eval ) which means "evaluate to get the string to display". > So there's clearly something dangerous here. Such evalution-in-mode-string > is new in Emacs-21, so most foo-mode-line-string variable have suddenly been > made dangerous. Instead of going through all those vars and marking them > risky, Emacs-21 decided that "if the var is not marked `risky', then ignore > any of those new :eval special forms". I.e. it's safe either way. but in > order to be able to use the new feature, you need to mark the var as > "risky". The documentation I have for `mode-line-format' has a slight bug, then. It says that "For a symbol, its value is used (but it is ignored if t or nil)."; it does not say that the symbol's value is processed recursively (as it does for the other things that are re-interpreted). The Elisp manual does describe the double-evaluation; should the docstring be changed? > I didn't discuss your general point about risky variables (because I mostly > agree with it). Well, I'm glad something I said made sense. Sorry that the rest was noise. Davis Herring -- This product is sold by volume, not by mass. If it seems too dense or too sparse, it means mass-energy conversion has occurred during shipping.