From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: +face-remapping-20040505-0.patch Date: 09 May 2004 20:17:04 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <874qqwrycm.fsf@tc-1-100.kawasaki.gol.ne.jp> <20040505221256.GB7789@fencepost> <20040508013940.GB6489@fencepost> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084148322 29928 80.91.224.253 (10 May 2004 00:18:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 10 May 2004 00:18:42 +0000 (UTC) Cc: bob@rattlesnake.com, emacs-devel@gnu.org, miles@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon May 10 02:18:34 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 1BMyV8-0001xt-00 for ; Mon, 10 May 2004 02:18:34 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BMyV8-0000DC-00 for ; Mon, 10 May 2004 02:18:34 +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 1BMyV5-00060g-4J for emacs-devel@quimby.gnus.org; Sun, 09 May 2004 20:18:31 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.33) id 1BMyUZ-0005kD-Eo for emacs-devel@gnu.org; Sun, 09 May 2004 20:17:59 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.33) id 1BMyTm-0004RF-OD for emacs-devel@gnu.org; Sun, 09 May 2004 20:17:42 -0400 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.33) id 1BMyTk-0004ML-5Y; Sun, 09 May 2004 20:17:08 -0400 Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 18F302121A; Sun, 9 May 2004 20:17:05 -0400 (EDT) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id D1EBE8C6AE; Sun, 9 May 2004 20:17:04 -0400 (EDT) Original-To: rms@gnu.org In-Reply-To: Original-Lines: 31 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-1.428, requis 5, BAYES_20 -1.43) 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:23006 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23006 > I still think that face-remapping should rely on face-inheritance rather > than allow mapping a face to several (merged) faces. > I am not quite sure what change you are proposing. > If you are saying that the feature of remapping X to (Y Z) > should be removed, and instead the user should have to > define W as (Y Z) then remap X to W, I think that is > a loss of convenience with nearly zero gain in simplicity. Well, maybe it doesn't make the code simpler, I don't know. But it does simplify the explanation of what (face-attribute X :foo) returns (since we've already dealt with the issue of whether it returns the info corresponding to Y or to Y+Z or to Y+Z+default). Also the added convenience of not having to define W might not be that great. After all, I expect 99% of the remapping to just be from X to Y. Also the intermediate W might/should be added anyway just to make easier for the user to customize the resulting face. Maybe it doesn't make the current implementation simple, but it at least makes the concept simpler. OTOH, that's assuming that "99% of the remapping [will] just be from X to Y". This 99% assumption assumes that mapping X to (X Y) doesn't work, tho. OTOH, I must say that the most important use of this remapping facility would be to tweak faces in various modes, so mapping X to (X Y) would be the most useful application, if not the only one. So maybe we should have face-addition-alist rather face-remapping-alist so we could just put (region . bold) in order to add bold to the region face. Stefan