From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.devel Subject: Re: About the :distant-foreground face attribute Date: Sun, 12 Jan 2014 14:07:23 +0100 Message-ID: <87ob3huz5g.fsf@engster.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> <87bnzlyvwb.fsf@gnu.org> <83wqi9cakl.fsf@gnu.org> <87zjn5584t.fsf@gnu.org> <8738kwydon.fsf@engster.org> <871u0dwiyv.fsf@engster.org> <0BD35771-1C3E-4108-8DBA-DF4ACD3FA7CB@swipnet.se> <87wqi5v1ae.fsf@engster.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1389532065 4736 80.91.229.3 (12 Jan 2014 13:07:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 12 Jan 2014 13:07:45 +0000 (UTC) Cc: Eli Zaretskii , Chong Yidong , Stefan Monnier , Drew Adams , emacs-devel To: Jan =?iso-8859-1?Q?Dj=E4rv?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 12 14:07:52 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 1W2Klc-0005Zh-CV for ged-emacs-devel@m.gmane.org; Sun, 12 Jan 2014 14:07:52 +0100 Original-Received: from localhost ([::1]:37801 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2Klb-0005Za-Sq for ged-emacs-devel@m.gmane.org; Sun, 12 Jan 2014 08:07:51 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2KlT-0005ZJ-IV for emacs-devel@gnu.org; Sun, 12 Jan 2014 08:07:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2KlN-0007kk-F2 for emacs-devel@gnu.org; Sun, 12 Jan 2014 08:07:43 -0500 Original-Received: from randomsample.de ([5.45.97.173]:42561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2KlN-0007kd-5d; Sun, 12 Jan 2014 08:07:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=RVdjb46s3cbZh5wWEK+/LIUB4J62FsVwcsPjRgdAM6A=; b=TUnoOjvejk0BclaqBG8L9w8+P98S56ccv56LHAzcbL06GBkD3FjyjIdxlEzL98m6K7xx6g9/yivczbvKz2krAaUHredOAd4gGPhH6JpkG6a4tuXsHPS3RQYz/YRgXI8L; Original-Received: from dslc-082-083-037-052.pools.arcor-ip.net ([82.83.37.52] helo=spaten) by randomsample.de with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1W2KlK-0003Qf-I6; Sun, 12 Jan 2014 14:07:35 +0100 In-Reply-To: ("Jan \=\?iso-8859-1\?Q\?Dj\=E4rv\=22's\?\= message of "Sun, 12 Jan 2014 13:56:20 +0100") User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux) Mail-Followup-To: Jan =?iso-8859-1?Q?Dj=E4rv?= , Eli Zaretskii , Chong Yidong , Stefan Monnier , Drew Adams , emacs-devel X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.45.97.173 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:168175 Archived-At: Jan Dj=E4rv writes: > Hello. > > 12 jan 2014 kl. 13:21 skrev David Engster : > >> Jan Dj=E4rv writes: >>> 12 jan 2014 kl. 12:14 skrev David Engster : >>>=20 >>>> David Engster writes: >>>>> I'm wondering: We already can set different face attributes depending= on >>>>> DISPLAY's 'background' property, which can be 'light' or 'dark'. Say = the >>>>> user is working with a 'dark' background by default, but we now detect >>>>> that one of the font-lock faces has not enough contrast when highligh= ted >>>>> by the region: why not simply switch to the face that is defined for >>>>> 'light' background instead? >>>>=20 >>>> Hey look, a tumbleweed! >>>>=20 >>>> I'm assuming everybody's simply stunned by my ingenious proposal? >>>>=20 >>>=20 >>> A theme does not have to suppy colors for properties light or dark. >>=20 >> So? It also does not have to supply the distant-foreground attribute. > > Right. But distant-foreground is implemented, It can be removed again. That is what this thread is about. > you proposal is not and does not add anything except moving colors to > some other place in the defface definition. Exactly. I want to fix the original bug by Darren without the need to introduce another face attribute. > Also, for a theme that does have a dark and light > version, there is no guarantee that applying the dark version on the > light version (or vice versa) is consistent with the theme look. A consistent color theme will choose the region's background color in a way that the font-lock colors are always visible in the first place. The problem is with the default colors. We can easily add a 'dark'/'light' foreground attribute to our default font-lock colors that work well with the default region background from GTK/NS. -David