From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: frame-local variables weirdness Date: Sun, 21 Oct 2007 15:20:04 -0400 Message-ID: References: <858x65lh4m.fsf@lola.goethe.zz> <2bfd4e060710171029g30a62313naf31c5363d85d6ca@mail.gmail.com> <87fy04sehj.fsf@catnip.gol.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1192994435 7243 80.91.229.12 (21 Oct 2007 19:20:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Oct 2007 19:20:35 +0000 (UTC) Cc: lekktu@gmail.com, stephen@xemacs.org, rms@gnu.org, emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 21 21:20:35 2007 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 1IjgLh-0001au-Qc for ged-emacs-devel@m.gmane.org; Sun, 21 Oct 2007 21:20:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IjgLa-0003Pb-2y for ged-emacs-devel@m.gmane.org; Sun, 21 Oct 2007 15:20:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IjgLR-0003Hb-Ud for emacs-devel@gnu.org; Sun, 21 Oct 2007 15:20:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IjgLQ-0003Ez-5U for emacs-devel@gnu.org; Sun, 21 Oct 2007 15:20:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IjgLP-0003Ef-Vy for emacs-devel@gnu.org; Sun, 21 Oct 2007 15:20:16 -0400 Original-Received: from tomts20.bellnexxia.net ([209.226.175.74] helo=tomts20-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IjgLH-0006Cw-T2; Sun, 21 Oct 2007 15:20:08 -0400 Original-Received: from ceviche.home ([74.12.205.156]) by tomts20-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20071021192004.DFTL8273.tomts20-srv.bellnexxia.net@ceviche.home>; Sun, 21 Oct 2007 15:20:04 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 3F196B41C1; Sun, 21 Oct 2007 15:20:03 -0400 (EDT) In-Reply-To: <87fy04sehj.fsf@catnip.gol.com> (Miles Bader's message of "Sun\, 21 Oct 2007 23\:56\:40 +0900") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) 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:81393 Archived-At: >>> It also has the big limitation that all references to the value must be >>> specially written to access a specifier. >> Right, just like right now they're specifically written to access a variable. > Er, well, isn't the point that that code is in general written to use > variables, so that's _not_ a burden? > The nice thing about these magic variables is that you can make > something frame specific even though the designer of the code didn't > think of that (he just used an ordinary global variable). Agreed. In this sense, specifiers are halfway between frame-local variables and using frame-parameter: like using frame-parameter they do require the programmer to expect that the variable is going to be made local to something, but like frame-local variables they do not require the programmer to know to what kind of thing it's going to be made local (it can be made buffer-local, frame-local, window-local, buffer-position-local, ... without changes to the code). Maybe a half-way between variables and specifiers would be to declare some variables as "specifiers": such variables can be read in the usual way (via symbol-value) and we could probably arange for setq to do something sensible as well, but let would be ruled out. Basically, this new proposal is trying to focus on the one issue which I believe is key: mixing object-local bindings with let-bindings is a source of pain and bugs. Stefan