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: +face-remapping-20040505-0.patch Date: 12 May 2004 10:30:39 +0900 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <20040505221256.GB7789@fencepost> <20040508013940.GB6489@fencepost> <873c68rvkd.fsf-monnier+emacs@gnu.org> <20040510223358.GD12917@fencepost> <87brkvq3ub.fsf-monnier+emacs@gnu.org> <40A0FF9C.7030807@yahoo.com> Reply-To: Miles Bader NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084325911 14448 80.91.224.253 (12 May 2004 01:38:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 12 May 2004 01:38:31 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed May 12 03:38:23 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 1BNihT-0001Ht-00 for ; Wed, 12 May 2004 03:38:23 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BNihT-000258-00 for ; Wed, 12 May 2004 03:38:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BNibq-00081f-KZ for emacs-devel@quimby.gnus.org; Tue, 11 May 2004 21:32:34 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BNiax-0007i3-48 for emacs-devel@gnu.org; Tue, 11 May 2004 21:31:39 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BNiaN-0007Ut-Ij for emacs-devel@gnu.org; Tue, 11 May 2004 21:31:36 -0400 Original-Received: from [202.32.8.214] (helo=TYO201.gate.nec.co.jp) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BNiaM-0007Rp-AA; Tue, 11 May 2004 21:31:02 -0400 Original-Received: from mailgate4.nec.co.jp (mailgate54.nec.co.jp [10.7.69.193]) by TYO201.gate.nec.co.jp (8.11.7/3.7W01080315) with ESMTP id i4C1Uhp25108; Wed, 12 May 2004 10:30:43 +0900 (JST) Original-Received: (from root@localhost) by mailgate4.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) id i4C1UgT03050; Wed, 12 May 2004 10:30:42 +0900 (JST) Original-Received: from edsgm01.lsi.nec.co.jp ([10.50.208.11]) by mailsv4.nec.co.jp (8.11.7/3.7W-MAILSV4-NEC) with ESMTP id i4C1Uf609147; Wed, 12 May 2004 10:30:41 +0900 (JST) Original-Received: from mcsss2.ucom.lsi.nec.co.jp (localhost [127.0.0.1]) by edsgm01.lsi.nec.co.jp (8.12.10/8.12.10) with ESMTP id i4C1UeRa020440; Wed, 12 May 2004 10:30:41 +0900 (JST) Original-Received: from mcspd15 (mcspd15 [10.30.114.174]) by mcsss2.ucom.lsi.nec.co.jp (8.12.10/8.12.8/EDcg v2.01-mc/1046780839) with ESMTP id i4C1UeaQ011689; Wed, 12 May 2004 10:30:40 +0900 (JST) Original-Received: by mcspd15 (Postfix, from userid 31295) id 17666411; Wed, 12 May 2004 10:30:40 +0900 (JST) Original-To: Kevin Rodgers System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: <40A0FF9C.7030807@yahoo.com> Original-Lines: 33 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:23205 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23205 Kevin Rodgers writes: > >>Face-remapping only affects redisplay; `face-attribute' will not see it. > > No, it seems wrong to me as well. Doesn't face-attribute exist to allow > the programmer to find out how a face will actually look? No. It exists to let you find out the attributes of a face, the inverse of `set-face-attribute' -- it's a fairly low-level operation. Note that by default, it will return `unspecified' for attributes that aren't _directly_ specified in a face, and this is intentional. The appearance of text, on the other hand, is not typically due to one face, but rather the merging of several faces. The `face-attribute' function _does_ have an optional argument to do face-merging on the result, so perhaps an additional argument might be added to do remapping too, analoguous to the current INHERIT argument. E.g.: (face-attribute FACE ATTRIBUTE &optional FRAME INHERIT REMAP) ... If REMAP is nil, the default frame-global face definitions will be used. If REMAP is t, faces will be remapped according to the current definition of `face-remapping-alist'. If REMAP is an alist, faces will be remapped as if `face-remapping-alist' had that value. -Miles -- Somebody has to do something, and it's just incredibly pathetic that it has to be us. -- Jerry Garcia