From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "rgb" Newsgroups: gmane.emacs.help Subject: Re: Defadvice use Date: 18 Apr 2005 17:15:41 -0700 Organization: http://groups.google.com Message-ID: <1113869741.838603.250620@o13g2000cwo.googlegroups.com> References: <1113844268.703229.310830@g14g2000cwa.googlegroups.com> <1113851147.155814.314630@g14g2000cwa.googlegroups.com> <87y8bfzx9z.fsf-monnier+gnu.emacs.help@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1113869780 31116 80.91.229.2 (19 Apr 2005 00:16:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 19 Apr 2005 00:16:20 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 19 02:16:20 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DNgPR-0002jx-NY for geh-help-gnu-emacs@m.gmane.org; Tue, 19 Apr 2005 02:16:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DNgTe-00051A-GM for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Apr 2005 20:20:30 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!o13g2000cwo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 55 Original-NNTP-Posting-Host: 198.74.20.118 Original-X-Trace: posting.google.com 1113869747 2290 127.0.0.1 (19 Apr 2005 00:15:47 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 19 Apr 2005 00:15:47 +0000 (UTC) In-Reply-To: <87y8bfzx9z.fsf-monnier+gnu.emacs.help@gnu.org> User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: o13g2000cwo.googlegroups.com; posting-host=198.74.20.118; posting-account=C7LM4w0AAAD23IRuMuUUJVCLQTuHhTK8 Original-Xref: shelby.stanford.edu gnu.emacs.help:130235 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:25803 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:25803 Stefan Monnier wrote: > > Doesn't (let (bookmark-bmenu-other-window) ...) have limited life. > > (let (bookmark-bmenu-other-window) ...) > > only affects the bookmark-bmenu-other-window *variable*, not the > bookmark-bmenu-other-window function. > If that isn't a bug waiting to happen I don't know what is. You appear to be asserting that it's documented to work that way but I'd counter with 2 arguments. 1. The `feature' is only _implied_, not documented. There is no mention in any Elisp manual section that covers plists or symbol function cells about this behavior. 2. The `feature' invalidates much of the documented behavior of symbols unless you know how the symbol was created. Look at this: (defun test1 () (let (a01) (put 'a01 'hold "this") (symbol-plist 'a01))) (put 'a01 'hold "that") ; insure symbol already exists (symbol-plist 'a01) => (hold "that") ; value is there as expected (test1) => (hold "this") (symbol-plist 'a01) => (hold "this") ; external value unexpectedly changed (unintern "a01") ; insure it doesn't exist (symbol-plist 'a01) => nil ; no error. (test1) => (hold "this") (symbol-plist 'a01) ; Given the external value should change => nil ; it now unexpectedly doesn't It's obviously impossible to easily create any function or macro that manipulates function or property cells unless you can guarantee none of the symbols are ever created by let. Since it appears to be by design, I'd be terribly curious to see any archive of discussions concerning why this is appropriate behavior.