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: Fri, 7 May 2004 21:39:40 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20040508013940.GB6489@fencepost> References: <874qqwrycm.fsf@tc-1-100.kawasaki.gol.ne.jp> <20040505221256.GB7789@fencepost> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1083980484 1354 80.91.224.253 (8 May 2004 01:41:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 8 May 2004 01:41:24 +0000 (UTC) Cc: bob@rattlesnake.com, emacs-devel@gnu.org, Stefan Monnier , miles@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat May 08 03:41:17 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 1BMGq5-0001zB-00 for ; Sat, 08 May 2004 03:41:17 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BMGq4-0006XZ-01 for ; Sat, 08 May 2004 03:41:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.33) id 1BMGpj-0007HA-JQ for emacs-devel@quimby.gnus.org; Fri, 07 May 2004 21:40:55 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.33) id 1BMGpC-0007G0-4d for emacs-devel@gnu.org; Fri, 07 May 2004 21:40:22 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.33) id 1BMGof-00072D-GO for emacs-devel@gnu.org; Fri, 07 May 2004 21:40:20 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.33) id 1BMGof-00071w-89 for emacs-devel@gnu.org; Fri, 07 May 2004 21:39:49 -0400 Original-Received: from miles by fencepost.gnu.org with local (Exim 4.33) id 1BMGoW-00020A-Qz; Fri, 07 May 2004 21:39:40 -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:22923 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22923 On Fri, May 07, 2004 at 09:20:33PM -0400, Richard Stallman wrote: > >> This specification uses the first face in the list, NEW-FACE, last. I > >> think it should use these faces in the order they appear. > > It should work the same way as when a list of faces is specified in the > `face' property, shouldn't it ? > > I think we're saying the same thing in different words. I'm not sure. The code currently uses the same function that face-inheritance uses (a face's :inherit attribute may be a list). Unfortunately, the manner in which that works is the _opposite_ of how a list of faces in a face property works. * In a face property, a list of faces is interpreted so that earlier faces in the list _override_ later faces in the list. * In an face-inheritance list, _later_ faces override earlier faces. E.g., for a face property, the following face list: (variable-pitch fixed pitch) will result in the display being `variable-pitch', but if the _same_ list occurs in a face-inheritance property, the display will use `fixed-pitch'! I'm not sure what to do about this; both behaviors kind of make sense. The :inherit behavior is somewhat closer to the implementation -- it just says `merge these faces one by one' -- whereas perhaps the face-property behavior of preferring earlier faces could seem more natural when viewed abstractly, but is actually a bit more of a pain to implement (it uses recursion to apply the face list in reverse order). Use the same code as the face-property for `face-remapping-alist' would have the advantage that you could use other `magic' face-property values for free, e.g. directly embedded attributes like (:foreground "green"), but if that were the case maybe the name `face-remapping-alist' would be slightly wrong? Along the same lines, perhaps one or the other of the two existing types of face-lists should be changed to be consistant with the other -- but which one? Any thoughts? Thanks, -Miles -- Would you like fries with that?