From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Re: About the :distant-foreground face attribute Date: Tue, 14 Jan 2014 16:47:37 +0800 Message-ID: <874n57ar12.fsf@gnu.org> 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> <52D3E689.6050902@dancol.org> <8E16225F-53EF-498A-AB35-66EB9B33B859@swipnet.se> <52D43360.6050605@dancol.org> <9BD01B88-AF13-44DD-8DBE-4598BAC136DD@swipnet.se> <52D45C73.6090906@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1389689272 16985 80.91.229.3 (14 Jan 2014 08:47:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Jan 2014 08:47:52 +0000 (UTC) Cc: Eli Zaretskii , Daniel Colascione , Jan =?utf-8?Q?Dj=C3=A4rv?= , emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 14 09:47:59 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 1W2zf7-0005uM-BN for ged-emacs-devel@m.gmane.org; Tue, 14 Jan 2014 09:47:53 +0100 Original-Received: from localhost ([::1]:47104 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2zf7-00070X-0F for ged-emacs-devel@m.gmane.org; Tue, 14 Jan 2014 03:47:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2zez-00070M-Cx for emacs-devel@gnu.org; Tue, 14 Jan 2014 03:47:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2zeu-0003En-1b for emacs-devel@gnu.org; Tue, 14 Jan 2014 03:47:45 -0500 Original-Received: from mail-pa0-x22b.google.com ([2607:f8b0:400e:c03::22b]:39963) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2zet-0003E9-PS; Tue, 14 Jan 2014 03:47:39 -0500 Original-Received: by mail-pa0-f43.google.com with SMTP id bj1so4305954pad.2 for ; Tue, 14 Jan 2014 00:47:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=j1mmBORTS5N1NZCr+dKBUNidTcbaEMF0x78vzPcQ0UI=; b=o/lhlbZhJhfKCHfsOENMrYMDooYK/vMwINq8oES3pUtoFf2DpB7IdBme/XqxD2YcDj ZH6aUnBX+wpJAnkoQPtpoyICux81iwr5UcFcPJu1liqhGA5wQ14dnBiIix0P5XsTzK1c tVujInx6FPiLU/J+ykjnacjdFRkppzq83LAvmFTVp8GzzUXmPhYvyQidQ7Xs2UahjK3j ZWuU1kTRnLDn9DXz0xtyQvPo/3IJfkRwqB1yrhtX64swF0CV93qcZeK3mY4eFDRuu67Y 8BEybXK4SC4Tprvi+qIrFqp+2+cYE/FG3JISthmMnsrgdxad9KbhJnNb04Gb6r+N57Yu tCvw== X-Received: by 10.66.142.233 with SMTP id rz9mr277209pab.71.1389689258166; Tue, 14 Jan 2014 00:47:38 -0800 (PST) Original-Received: from tsparkle ([155.69.16.255]) by mx.google.com with ESMTPSA id y9sm55854590pas.10.2014.01.14.00.47.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Jan 2014 00:47:36 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Mon, 13 Jan 2014 18:57:02 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::22b 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:168342 Archived-At: Stefan Monnier writes: > But I'd first like to hear Yidong's opinion on why it'd be better to > fold the "alternate background" feature into the :foreground attribute > rather than having it as a separate attribute. 1. Each aspect of a face should be controlled by one attribute, like :height (which can take either relative or absolute heights), and unlike :font vs :family (which has been a source of annoyance). 2. As currently implemented, :distant-foreground is the only attribute that can be `unspecified' even for the default face. This breaks a nice and easily understandable rule, that `face-attribute' returns something specific for each attribute of the default face. 3. Neatness aside, if the alternative color stuff is supposed to be disabled by setting :distant-foreground to `unspecified', as it is now, then one cannot inherit from a face and then disable the alternative color specified by the parent. If :distant-foreground is `unspecified' in the inheriting face, the parent's non-`unspecified' value of :distant-foreground takes effect. I suppose one could get around 2. and 3. by using a value of nil to disable the alternative color. This then breaks the symmetry between :foreground and :distant-foreground, as the former does not take nil values (although `internal-set-lisp-face-attribute' accepts a nil value, that's only for 20.x background compatibility).