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 09:43:15 -0800 Message-ID: <9aa0cfde0811020943l24121f8cj78bbf82709036f9d@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 1225647921 15478 80.91.229.12 (2 Nov 2008 17:45:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Nov 2008 17:45:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Stefan Monnier" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 02 18:46:23 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 1Kwh1r-00061L-20 for ged-emacs-devel@m.gmane.org; Sun, 02 Nov 2008 18:46:23 +0100 Original-Received: from localhost ([127.0.0.1]:52968 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kwh0j-0003iQ-NM for ged-emacs-devel@m.gmane.org; Sun, 02 Nov 2008 12:45:13 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kwgyt-0002nu-T5 for emacs-devel@gnu.org; Sun, 02 Nov 2008 12:43:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kwgys-0002mw-7v for emacs-devel@gnu.org; Sun, 02 Nov 2008 12:43:19 -0500 Original-Received: from [199.232.76.173] (port=45706 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kwgys-0002mm-0B for emacs-devel@gnu.org; Sun, 02 Nov 2008 12:43:18 -0500 Original-Received: from wf-out-1314.google.com ([209.85.200.174]:7112) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kwgyr-0001JJ-NY for emacs-devel@gnu.org; Sun, 02 Nov 2008 12:43:18 -0500 Original-Received: by wf-out-1314.google.com with SMTP id 28so2196912wfc.24 for ; Sun, 02 Nov 2008 09:43:15 -0800 (PST) Original-Received: by 10.142.229.5 with SMTP id b5mr6687857wfh.50.1225647795411; Sun, 02 Nov 2008 09:43:15 -0800 (PST) Original-Received: by 10.143.11.8 with HTTP; Sun, 2 Nov 2008 09:43:15 -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:105265 Archived-At: > > It seems to me that this behavior is broken, but if it's to be kept > It's partly broken, but other behaviors are broken in other ways. > The only good solution is to be careful not to mix them up (except when > it's really wanted, such as with default-directory which is often > let-bound). My point was that the only way to avoid mixing the behaviors is to make variable names unwieldy. As an async-event-handler-writer all function arguments and local variables must be globally-uniquely-named, and as a major-mode writer all buffer-local variables must be globally-uniquely-named. The latter is perhaps not too terrible a burden, but the former would make coding in elisp unbearable IMO. I'll report this to the gnus devel list. > > there needs to be strong guidance against making variables whose names > > /aren't/ prefixed with the package name buffer-local. > Agreed. Where would you like to see it? In the coding conventions? At least also at the same place as the warning about the conflict between buffer-locals and let-binding in elisp.info that I pointed to in my original email. But also this should be a great big warning in the defun docs of the make-variable-*-local and make-local-variable since it's the authors using those functions (and friends? I don't have a complete list) that must shoulder the burden of avoiding collisions. -a