From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: About the :distant-foreground face attribute Date: Sun, 12 Jan 2014 17:59:30 -0500 Message-ID: References: <87bnzo9cja.fsf@gnu.org> <59B7E7FC-48D0-4737-B1BB-FFAC5BA9E07A@swipnet.se> <874n5f3162.fsf@gnu.org> <83fvozf86g.fsf@gnu.org> <87r48javwe.fsf@gnu.org> <83bnzmfjxe.fsf@gnu.org> <87bnzlyvwb.fsf@gnu.org> <83wqi9cakl.fsf@gnu.org> <87zjn5584t.fsf@gnu.org> <8738kwydon.fsf@engster.org> <871u0dwiyv.fsf@engster.org> <87fvot2c18.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1389567601 12976 80.91.229.3 (12 Jan 2014 23:00:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 12 Jan 2014 23:00:01 +0000 (UTC) Cc: Eli Zaretskii , jan.h.d@swipnet.se, Drew Adams , emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 13 00:00:04 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W2U0h-0007aR-Vk for ged-emacs-devel@m.gmane.org; Mon, 13 Jan 2014 00:00:04 +0100 Original-Received: from localhost ([::1]:39798 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2U0h-0005LU-MY for ged-emacs-devel@m.gmane.org; Sun, 12 Jan 2014 18:00:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2U0Y-0005JE-Ku for emacs-devel@gnu.org; Sun, 12 Jan 2014 18:00:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2U0R-0006h5-Br for emacs-devel@gnu.org; Sun, 12 Jan 2014 17:59:54 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:3703) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2U0C-0006gB-1g; Sun, 12 Jan 2014 17:59:32 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFMCoyj/2dsb2JhbABEvw4Xc4IfAQVWIxALDiYSFBgNJIgkwS2RCgOIYZwZgV6DFQ X-IPAS-Result: Av4EABK/CFFMCoyj/2dsb2JhbABEvw4Xc4IfAQVWIxALDiYSFBgNJIgkwS2RCgOIYZwZgV6DFQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="44788523" Original-Received: from 76-10-140-163.dsl.teksavvy.com (HELO pastel.home) ([76.10.140.163]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 12 Jan 2014 17:59:30 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 943A160791; Sun, 12 Jan 2014 17:59:30 -0500 (EST) In-Reply-To: <87fvot2c18.fsf@gnu.org> (Chong Yidong's message of "Mon, 13 Jan 2014 04:14:11 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:168259 Archived-At: > - Allow :foreground to take the value of (fallback COLOR) or something > like that, which would be equivalent to setting :foreground to > unspecified and :distant-foreground to COLOR. This syntax implies that a face can't set both :foreground and :distant-foreground at the same time, even tho the combination of the two is meaningful (it means "use color X if that's readable and color Y otherwise"). So I think it makes more sense to use a syntax that can specify both, such as (COLOR . FALLBACK) or (choose COLOR1 COLOR2). Now, what happens in the following case: - face1 sets foreground to (choose COLOR1 COLOR2) - face2 sets foreground to COLOR3 and inherits from face1. Is the resulting "merge" equivalent to COLOR3 or to (choose COLOR3 COLOR2) or to (choose COLOR3 COLOR1 COLOR2)? I think, to be a useful feature, the merge can't be COLOR3, so it would have to be (choose COLOR3 COLOR2) or (choose COLOR3 COLOR1 COLOR2). Is that really better than what we have now? But now I wonder: what's the benefit from folding this "alternate" color into :foreground compared to having it in a new property :distant-foreground? > (We still need a replacement term for "distant foreground". As > mentioned before, this term sounds nonsensical.) Agreed. Maybe :alternative-foreground? Stefan