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: Wed, 28 May 2008 22:21:27 +0200 Message-ID: <85lk1ui3i0.fsf@lola.goethe.zz> References: <5CB5F5E5-9239-40A8-A3B2-5F49B94E27B7@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1212006118 18775 80.91.229.12 (28 May 2008 20:21:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 May 2008 20:21:58 +0000 (UTC) Cc: David Reitter , Miles Bader , Emacs-Devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 28 22:22:39 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 1K1SAK-0003I5-Gw for ged-emacs-devel@m.gmane.org; Wed, 28 May 2008 22:22:32 +0200 Original-Received: from localhost ([127.0.0.1]:48832 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K1S9Z-0007cj-2i for ged-emacs-devel@m.gmane.org; Wed, 28 May 2008 16:21:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K1S9T-0007a3-RU for emacs-devel@gnu.org; Wed, 28 May 2008 16:21:39 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K1S9R-0007We-Ka for emacs-devel@gnu.org; Wed, 28 May 2008 16:21:38 -0400 Original-Received: from [199.232.76.173] (port=53468 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K1S9R-0007WU-Fh for emacs-devel@gnu.org; Wed, 28 May 2008 16:21:37 -0400 Original-Received: from mail-in-02.arcor-online.net ([151.189.21.42]:55552) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K1S9O-0007ov-3T; Wed, 28 May 2008 16:21:34 -0400 Original-Received: from mail-in-20-z2.arcor-online.net (mail-in-20-z2.arcor-online.net [151.189.8.85]) by mail-in-02.arcor-online.net (Postfix) with ESMTP id 7836B32E994; Wed, 28 May 2008 22:21:32 +0200 (CEST) Original-Received: from mail-in-09.arcor-online.net (mail-in-09.arcor-online.net [151.189.21.49]) by mail-in-20-z2.arcor-online.net (Postfix) with ESMTP id 5FD9710790E; Wed, 28 May 2008 22:21:32 +0200 (CEST) Original-Received: from lola.goethe.zz (dslb-084-061-010-063.pools.arcor-ip.net [84.61.10.63]) by mail-in-09.arcor-online.net (Postfix) with ESMTP id BE26634A97E; Wed, 28 May 2008 22:21:30 +0200 (CEST) Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 55FE31C452E5; Wed, 28 May 2008 22:21:27 +0200 (CEST) In-Reply-To: (Stefan Monnier's message of "Wed, 28 May 2008 15:25:11 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-Virus-Scanned: ClamAV 0.92.1/7279/Wed May 28 20:10:18 2008 on mail-in-09.arcor-online.net X-Virus-Status: Clean X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:97930 Archived-At: Stefan Monnier writes: >> Miles, could you clarify why you are proposing a remapping list rather than >> "buffer-local faces"? > > I think adding "buffer-local faces" directly is no better. The good > thing about Miles's patch is that it leverages buffer-local variables to > modify faces buffer-locally. As a result, his patch is pretty small. > > To improve on this, I think we'd have to move to something more like > XEmacs's specifiers. But I haven't even seen any proposal for such > a thing yet. Proposal: allow a third argument for make-local-variable. (make-local-variable VARIABLE &optional locus) Make VARIABLE have a separate value in the given locus (defaulting to the current buffer). A locus can be a buffer, a frame, a terminal, a window. When there is more than one locus for which a variable may be local, the value is used from the first locus in the list window - buffer - frame - terminal. (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. variable-binding-locus is a built-in function in `C source code'. (variable-binding-locus VARIABLE) Return a value indicating where VARIABLE's current binding comes from. If the current binding is buffer-local, the value is the current buffer. If the current binding is frame-local, the value is the selected frame. If the current binding is global (the default), the value is nil. Bing. A simple API, easy to understand, easy to use. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum