From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: face-remapping patch Date: Thu, 29 May 2008 13:14:21 +0200 Message-ID: <86ve0xnz02.fsf@lola.quinscape.zz> References: <5CB5F5E5-9239-40A8-A3B2-5F49B94E27B7@gmail.com> <85lk1ui3i0.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1212059707 2007 80.91.229.12 (29 May 2008 11:15:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 May 2008 11:15:07 +0000 (UTC) Cc: david.reitter@gmail.com, emacs-devel@gnu.org, monnier@iro.umontreal.ca, miles@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 29 13:15:47 2008 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 1K1g6a-0007Tx-4r for ged-emacs-devel@m.gmane.org; Thu, 29 May 2008 13:15:36 +0200 Original-Received: from localhost ([127.0.0.1]:54265 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K1g5o-0005VZ-JO for ged-emacs-devel@m.gmane.org; Thu, 29 May 2008 07:14:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K1g5R-0005Kr-Pe for emacs-devel@gnu.org; Thu, 29 May 2008 07:14:25 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K1g5R-0005KV-6t for emacs-devel@gnu.org; Thu, 29 May 2008 07:14:25 -0400 Original-Received: from [199.232.76.173] (port=46322 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K1g5Q-0005KQ-U9 for emacs-devel@gnu.org; Thu, 29 May 2008 07:14:24 -0400 Original-Received: from mail.quinscape.de ([212.29.44.217]:33171) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K1g5Q-0006EX-Ei for emacs-devel@gnu.org; Thu, 29 May 2008 07:14:24 -0400 Original-Received: (qmail-ldap/ctrl 18032 invoked from network); 29 May 2008 11:14:22 -0000 Original-Received: from unknown (HELO lola.quinscape.zz) ([10.0.3.43]) (envelope-sender ) by quinx.quinscape.de (qmail-ldap-1.03) with SMTP for ; 29 May 2008 11:14:22 -0000 Original-Received: by lola.quinscape.zz (Postfix, from userid 1001) id 9E96C8F033; Thu, 29 May 2008 13:14:21 +0200 (CEST) In-Reply-To: (Richard M. Stallman's message of "Thu, 29 May 2008 06:25:09 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-AntiVirus: checked by AntiVir MailGate (version: 2.1.3-2; AVE: 7.8.0.19; VDF: 7.0.4.109; host: quinx) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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:97967 Archived-At: Richard M Stallman writes: > Your local variable feature is quite clean. If features could be implemented just by writing DOC strings, we'd likely have a lot of clean features. The documentation might be clean, but that does not necessarily make the implementation nice. > (local-variable-p VARIABLE &optional LOCUS) > > Non-nil if VARIABLE has a local binding in locus LOCUS (see make-variable). > BUFFER defaults to the current buffer. > > If LOCUS is nil, this should mean "Is any kind of local binding now in > effect?" Well, that would be backwards incompatible: I actually stole half of the descriptions from existing functions and DOC strings. I was just describing an interface that I would be able to understand. That does not mean that it corresponds with a simple or elegant or efficient or flexible implementation. If a variable has an associated vector of locuses, the elements of which would be something like [last-checked-selected-window last-checked-current-buffer last-checked-selected-frame last-checked-selected-terminal] Where "nil" means "no local value of that kind for this variable", then when accessing a variable, one would run through that array, and would for the first non-nil entry not corresponding to the current locus update the current value from some hash structure indexed via (locus . symbol). A list instead of a vector would be conceivable, too, (and would make the default of variables without any local binding faster) but one would have to think about how to order and prioritize it properly, then. -- David Kastrup