From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: Buffer-local faces Date: Mon, 3 May 2004 19:19:27 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20040503231927.GA9451@fencepost> References: <20040503130350.GA1929@fencepost> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1083626757 32272 80.91.224.253 (3 May 2004 23:25:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 3 May 2004 23:25:57 +0000 (UTC) Cc: emacs-devel@gnu.org, Miles Bader Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue May 04 01:25:52 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BKmoq-0007Ng-00 for ; Tue, 04 May 2004 01:25:52 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BKmoq-00013W-00 for ; Tue, 04 May 2004 01:25:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BKmlR-0001yR-1t for emacs-devel@quimby.gnus.org; Mon, 03 May 2004 19:22:21 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BKmjg-0001DM-3i for emacs-devel@gnu.org; Mon, 03 May 2004 19:20:32 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BKmip-0000fR-8G for emacs-devel@gnu.org; Mon, 03 May 2004 19:20:11 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BKmik-0000VG-JL for emacs-devel@gnu.org; Mon, 03 May 2004 19:19:34 -0400 Original-Received: from miles by fencepost.gnu.org with local (Exim 4.24) id 1BKmid-00042u-AS; Mon, 03 May 2004 19:19:27 -0400 Original-To: Richard Stallman Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i Blat: Foop X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:22664 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22664 On Mon, May 03, 2004 at 06:20:46PM -0400, Richard Stallman wrote: > Each element is of the form: > (FACE . NEW-FACE) > or > (FACE NEW-FACE MERGE-FACE...), > which causes NEW-FACE to be used where FACE normally would. > If present, MERGE-FACE... are merged during display with NEW-FACE. > > Wouldn't it be cleaner just to have one kind of element, > (FACE REPLACEMENT-FACES...) I think so, but I'm not entirely sure if it's possible; perhaps it is. The question is whether there are places that want remapping, but don't operate in terms of face-ids -- e.g., they use `lisp-faces' (lisp vectors), or face names. Face-ids can represent merged faces, but the other representations can not, so my original thought while implementing this was that I'd need to support the concept of a `simple remapping' that merely returned one face name/vector for another. However that may actually not be necessary. I still have to go through the corner cases I think. A related questions is whether the remapping should be visible to lisp code using face functions. For instance, does (face-attribute 'default :family) 1. return the remapped family, or 2. return the family of the `underlying' default face? My current patch does the former, but now I'm leaning towards making it the latter, and having remapping be a pure display operation -- it just seems simpler to deal with. Lisp code that's interested in such matters can look at the variable to see what's up. -Miles -- `Cars give people wonderful freedom and increase their opportunities. But they also destroy the environment, to an extent so drastic that they kill all social life' (from _A Pattern Language_)