From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ami Fischman" Newsgroups: gmane.emacs.devel Subject: Re: crazy interaction between buffer-locality and function-locality of variables Date: Sun, 2 Nov 2008 15:59:33 -0800 Message-ID: <9aa0cfde0811021559l3c596ed3rc0d6c5896e275bfc@mail.gmail.com> References: <9aa0cfde0811012034h30c79d6cxa66f6ee0754e027d@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1225670391 15072 80.91.229.12 (2 Nov 2008 23:59:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Nov 2008 23:59:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 03 01:00:53 2008 connect(): Connection refused 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 1KwmsF-0001mr-BR for ged-emacs-devel@m.gmane.org; Mon, 03 Nov 2008 01:00:51 +0100 Original-Received: from localhost ([127.0.0.1]:35557 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kwmr8-0006vo-Bs for ged-emacs-devel@m.gmane.org; Sun, 02 Nov 2008 18:59:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kwmr3-0006uQ-UN for emacs-devel@gnu.org; Sun, 02 Nov 2008 18:59:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kwmr2-0006tX-5I for emacs-devel@gnu.org; Sun, 02 Nov 2008 18:59:37 -0500 Original-Received: from [199.232.76.173] (port=46925 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kwmr1-0006tU-VO for emacs-devel@gnu.org; Sun, 02 Nov 2008 18:59:35 -0500 Original-Received: from wf-out-1314.google.com ([209.85.200.172]:59381) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kwmr0-0002Ei-HR; Sun, 02 Nov 2008 18:59:34 -0500 Original-Received: by wf-out-1314.google.com with SMTP id 28so2313985wfc.24 for ; Sun, 02 Nov 2008 15:59:33 -0800 (PST) Original-Received: by 10.142.237.19 with SMTP id k19mr6856975wfh.235.1225670373061; Sun, 02 Nov 2008 15:59:33 -0800 (PST) Original-Received: by 10.143.11.8 with HTTP; Sun, 2 Nov 2008 15:59:33 -0800 (PST) In-Reply-To: Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:105276 Archived-At: > Is the behavior of binding function arguments variables subject to the > locality of the current buffer at function call time intentional? > That's a confusing way to describe things. I intentionally described the behavior I observed in a way as confusing as I found the behavior to be, hoping to draw attention to the deficiency I considered in the behavior. > The current buffer > when the function is called has no direct effect on the function. > What does have an effect is switching buffers within the function. This distinction lacks a difference to me. Buffer-switching is a standard idiom of elisp and normally considered an implementation detail of a function, not part of its external contract. If including buffer-switching in a function's code unbinds variables bound in that function then that promotes the presence of buffer-switching from implementation detail to externally-visible effect. Put another way, a function that uses buffer-switching is always at the mercy of the buffers in which it is invoked, to avoid making local variables with the same names as the function's arguments or let-bound variables. This is what I was hoping was unintentional and fixable, though you and Stefan have now told me that it is the lesser evil (and by implication here to stay). > We should probably change the name of that variable in Gnus. > to something like `gnus-timestamp'. I have posted a request for something similar to the gnus mailing list: http://thread.gmane.org/gmane.emacs.gnus.general/67732 -a