From unknown Tue Jun 17 20:27:26 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#40336 <40336@debbugs.gnu.org> To: bug#40336 <40336@debbugs.gnu.org> Subject: Status: default face spec doesn't get overriden Reply-To: bug#40336 <40336@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:27:26 +0000 retitle 40336 default face spec doesn't get overriden reassign 40336 emacs submitter 40336 Bad Blue Bull severity 40336 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 30 18:38:52 2020 Received: (at submit) by debbugs.gnu.org; 30 Mar 2020 22:38:52 +0000 Received: from localhost ([127.0.0.1]:35230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jJ33T-0002Tw-A5 for submit@debbugs.gnu.org; Mon, 30 Mar 2020 18:38:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:42258) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jJ33R-0002To-Hq for submit@debbugs.gnu.org; Mon, 30 Mar 2020 18:38:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53829) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ33Q-0005Zl-4J for bug-gnu-emacs@gnu.org; Mon, 30 Mar 2020 18:38:49 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, SPOOFED_FREEMAIL,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJ33O-0005ml-Bl for bug-gnu-emacs@gnu.org; Mon, 30 Mar 2020 18:38:47 -0400 Received: from forward400j.mail.yandex.net ([2a02:6b8:0:801:2::105]:52328) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jJ33N-0005je-RK for bug-gnu-emacs@gnu.org; Mon, 30 Mar 2020 18:38:46 -0400 Received: from mxback3j.mail.yandex.net (mxback3j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10c]) by forward400j.mail.yandex.net (Yandex) with ESMTP id D04706E0911 for ; Tue, 31 Mar 2020 01:38:40 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback3j.mail.yandex.net (mxback/Yandex) with ESMTP id rDFwa4Vsxs-cetibK7a; Tue, 31 Mar 2020 01:38:40 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1585607920; bh=QvQ4jFNyjgGdnK/IsUNdGoRyhKQGGE5NDe7aKkF+ucg=; h=Message-Id:Date:Subject:To:From; b=ZVkmeICvLNQshomGZat1rMtnzRxJ27qiyJVhtIRlG4osepyholMUx351GAW2+cGYT YlGzeAeBS/9vQ6p34J3wrUWod4SRDv7wVwMiBJFXEQi9ZOtzq5NXYkqx3suxJRNo4w 3DQfuIZT0U7NP8r/5c5iQoTIfKHNFMlqEqMll0lU= Authentication-Results: mxback3j.mail.yandex.net; dkim=pass header.i=@yandex.ru Received: by myt5-3a82a06244de.qloud-c.yandex.net with HTTP; Tue, 31 Mar 2020 01:38:40 +0300 From: Bad Blue Bull To: "bug-gnu-emacs@gnu.org" Subject: default face spec doesn't get overriden MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 31 Mar 2020 01:38:40 +0300 Message-Id: <6905531585606838@vla1-a4c6eab2e6c6.qloud-c.yandex.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a02:6b8:0:801:2::105 X-Spam-Score: 2.3 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Maybe I'm getting something wrong. > ‘default’ > This element of SPEC doesn’t match any terminal; instead, it > specifies defaults that apply to all terminals. This element, > if used, must be the first element of SPEC. Each of t [...] Content analysis details: (2.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: yandex.ru] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [209.51.188.17 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (ibmbull[at]yandex.ru) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 2.0 SPOOFED_FREEMAIL No description available. X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Maybe I'm getting something wrong. > =E2=80=98default=E2=80=99 > This element of SPEC doesn=E2=80=99t match any terminal; instead, it > specifies defaults that apply to all terminals. This element, > if used, must be the first element of SPEC. Each of the > following elements can override any or all of these defaults. (progn (face-spec-set 'zzz '((default :background "red") (((background dark)) :weight bold :background "black" :foreground "W= hite" ) (((background light)) :weight bold :background "yellow" :foreground = "Black" ) )) (insert (propertize "XXX" 'face 'zzz))) Eval it and see default background gets applied despite it should be over= riden by a spec line that matches terminal's background. From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 02 15:36:33 2020 Received: (at 40336) by debbugs.gnu.org; 2 Apr 2020 19:36:33 +0000 Received: from localhost ([127.0.0.1]:40812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jK5dh-0000ll-Bx for submit@debbugs.gnu.org; Thu, 02 Apr 2020 15:36:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50627) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jK5df-0000lQ-Lc for 40336@debbugs.gnu.org; Thu, 02 Apr 2020 15:36:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jK5da-0006d0-4o; Thu, 02 Apr 2020 15:36:26 -0400 Received: from [176.228.60.248] (port=1410 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jK5dZ-0002L2-9S; Thu, 02 Apr 2020 15:36:25 -0400 Date: Thu, 02 Apr 2020 22:36:08 +0300 Message-Id: <838sjdy91z.fsf@gnu.org> From: Eli Zaretskii To: Bad Blue Bull In-Reply-To: <6905531585606838@vla1-a4c6eab2e6c6.qloud-c.yandex.net> (message from Bad Blue Bull on Tue, 31 Mar 2020 01:38:40 +0300) Subject: Re: bug#40336: default face spec doesn't get overriden References: <6905531585606838@vla1-a4c6eab2e6c6.qloud-c.yandex.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40336 Cc: 40336@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Bad Blue Bull > Date: Tue, 31 Mar 2020 01:38:40 +0300 > > (progn > (face-spec-set 'zzz > '((default :background "red") > (((background dark)) :weight bold :background "black" :foreground "White" ) > (((background light)) :weight bold :background "yellow" :foreground "Black" ) > )) > > (insert (propertize "XXX" 'face 'zzz))) > > > Eval it and see default background gets applied despite it should be overriden by a spec line that matches terminal's background. Thanks. Does the patch below fix that? diff --git a/lisp/faces.el b/lisp/faces.el index 9a49ea8..e707f6f 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1560,7 +1560,7 @@ face-spec-choose ;; return it to the caller. Since there will most definitely be something to ;; return in this case, there's no need to know/check if a match was found. (if defaults - (append result defaults) + (append defaults result) (if match-found result no-match-retval)))) From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 04 03:01:17 2020 Received: (at 40336-done) by debbugs.gnu.org; 4 Apr 2020 07:01:17 +0000 Received: from localhost ([127.0.0.1]:43394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jKcnt-0004Yf-FP for submit@debbugs.gnu.org; Sat, 04 Apr 2020 03:01:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51211) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jKcnr-0004YE-Rg for 40336-done@debbugs.gnu.org; Sat, 04 Apr 2020 03:01:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jKcnk-0002Ms-T7; Sat, 04 Apr 2020 03:01:10 -0400 Received: from [176.228.60.248] (port=3578 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jKcnk-0000Qz-01; Sat, 04 Apr 2020 03:01:08 -0400 Date: Sat, 04 Apr 2020 10:00:57 +0300 Message-Id: <83v9mfviom.fsf@gnu.org> From: Eli Zaretskii To: Bad Blue Bull In-Reply-To: <4667731585952810@iva8-03ad76494624.qloud-c.yandex.net> (message from Bad Blue Bull on Sat, 04 Apr 2020 01:27:16 +0300) Subject: Re: bug#40336: default face spec doesn't get overriden References: <6905531585606838@vla1-a4c6eab2e6c6.qloud-c.yandex.net> <838sjdy91z.fsf@gnu.org> <4667731585952810@iva8-03ad76494624.qloud-c.yandex.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40336-done Cc: 40336-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Bad Blue Bull > Date: Sat, 04 Apr 2020 01:27:16 +0300 > > Yes, well done. Thanks, installed on the master branch. From unknown Tue Jun 17 20:27:26 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 02 May 2020 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 26 09:51:29 2020 Received: (at control) by debbugs.gnu.org; 26 Aug 2020 13:51:30 +0000 Received: from localhost ([127.0.0.1]:37839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAvpp-0000KN-I4 for submit@debbugs.gnu.org; Wed, 26 Aug 2020 09:51:29 -0400 Received: from mail-wr1-f46.google.com ([209.85.221.46]:39304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAvpn-0000KA-LG for control@debbugs.gnu.org; Wed, 26 Aug 2020 09:51:28 -0400 Received: by mail-wr1-f46.google.com with SMTP id a5so1881220wrm.6 for ; Wed, 26 Aug 2020 06:51:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9tqPF5uxaLc6YWzmNSkllYM1eTvGrRdynvoXbe1ugOo=; b=h0z4Q5JI3zOny7m52G/SsjQWxdyzM1A5oyxnA67k9vKjOxcuWliLCS+h7og97ZOdte tbHVQKQC+AffYaVMR2uTE1OmFPDMtRx0nncbr2/G86pu2ug3Im6y2CvT52Xd2yRFY7yE JJyziIclIX7qXmWBa0YFDFYd9xMgM7812+FpWtxkzYaidWAmjHhltcDSAPMV1ZZxYvgR LTzA/0xOxycVupJ0kQ1C3i0GbYgRqYjY3TfvA/MMxsRKflO+I08jncMspsvMs5KSoiB+ vFaYRrEXqSs2+l/ln0HhHqUvHXfdBipHEI+oseMrhAlLcDdtvYJtn7yG8t/YZFPElxKC RI0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9tqPF5uxaLc6YWzmNSkllYM1eTvGrRdynvoXbe1ugOo=; b=D7nPmEi10yRt63frhMFSfAZj+dOc6au+VBwlsKFG90ogfsrf8msxZ7PO0XxyTk77WM +GSqETeAVH2kRa42DYOT7RjCHDhTEP2V8kiHil16LfKRkc4ui2o6K+XhxV1fN1mVNEXc 7LZ8vOUAJuYA+NLxgfkOKPYBj5Mqb1WIFcmIZBAK+K+injoDT5Zoa0ejkA+ntRwI5ay9 C+vAXTiETuSOfN036xTivkdYfJTVZXTf6DK0WSNpPoyDZ/PVQyxdrWQqI40MtQ1sUutf 5CYeT625RTYbKAE0ixqWFp7FDpf5p+qG7one2jOcmfZ8Es49VYWrkX/mN3sB8qFqA2RG /kKw== X-Gm-Message-State: AOAM532XSQPxHHGsYHvMRkP0RHWtwK9WvBcH4MgeoE7mbx1Xbu3f3oJC yAJKwTW9s8/0rd3Iq7HXSjlFycin/vaOG420M9k= X-Google-Smtp-Source: ABdhPJx2ZKi+5C/bbJvQYC4sZNJ6rRr/Ym3c5HY2+ME/XvS6UFa6NNwMQSDGLTKOzXlwRUowcEM9MLXctd7WUDge3mQ= X-Received: by 2002:adf:e452:: with SMTP id t18mr14751665wrm.109.1598449881724; Wed, 26 Aug 2020 06:51:21 -0700 (PDT) MIME-Version: 1.0 References: <83sgc936a2.fsf@gnu.org> In-Reply-To: <83sgc936a2.fsf@gnu.org> From: Mauro Aranda Date: Wed, 26 Aug 2020 10:51:09 -0300 Message-ID: Subject: Re: bug#18074: 24.3.50; `default' clause in face specs with custom-theme-set-faces doesn't work as advertised To: Eli Zaretskii Content-Type: multipart/alternative; boundary="00000000000064395405adc81d8c" Bcc: control@debbugs.gnu.org X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control Cc: Frank Terbeck , 18074@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000064395405adc81d8c Content-Type: text/plain; charset="UTF-8" unarchive 40336 forcemerge 40336 18074 quit Eli Zaretskii writes: >> From: Mauro Aranda >> Date: Wed, 26 Aug 2020 09:50:34 -0300 >> Cc: 18074@debbugs.gnu.org, Eli Zaretskii >> >> > (deftheme foobar "Foobar theme") >> > (custom-theme-set-faces 'foobar >> > '(default ((default :slant normal >> > :weight bold >> > :foreground "white" >> > :background "black") >> > (t :foreground "blue")))) >> > >> > What I would expect is the `blue' foreground definition from the `t' >> > clause to override the `white' foreground definition from the `default' >> > clause. But alas, it doesn't work, the foreground remains white. >> >> I can reproduce this in Emacs 27, but not with current master. >> >> It looks like this was fixed in: >> commit 05d365d3105371ec956f31f109a2de14c5cf67df >> Author: Eli Zaretskii >> Date: Sat Apr 4 09:59:16 2020 +0300 >> >> Fix face spec handling for 'default' "terminal class" >> >> * lisp/faces.el (face-spec-choose): Reverse order of 'defaults' >> and 'result' when generating attribute list, so that the spec for >> 'default' "terminal class" is indeed overridden by the actual >> class's spec, per the documentation. (Bug#40336) >> >> CCing Eli, hoping he can confirm. > > Confirmed, thanks. Thanks. Merging this bug with Bug#40336. --00000000000064395405adc81d8c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
unarchive 40336
forcemerge 40336 18074=
quit

Eli Zaretskii <eliz@gnu.= org> writes:

>> From: Mauro Aranda <maurooaranda@gmail.com>
>> Date: = Wed, 26 Aug 2020 09:50:34 -0300
>> Cc: 18074@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
>>
>> > (defthem= e foobar "Foobar theme")
>> > (custom-theme-set-faces= 'foobar
>> > =C2=A0 '(default ((default :slant normal<= br>>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 :weight bold
>> > =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 :foreground "whit= e"
>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 :background "black")
>> >= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(t :foreground "blue&= quot;))))
>> >
>> > What I would expect is the `blu= e' foreground definition from the `t'
>> > clause to ov= erride the `white' foreground definition from the `default'
>= > > clause. But alas, it doesn't work, the foreground remains whi= te.
>>
>> I can reproduce this in Emacs 27, but not with= current master.
>>
>> It looks like this was fixed in:<= br>>> commit 05d365d3105371ec956f31f109a2de14c5cf67df
>> Aut= hor: Eli Zaretskii <eliz@gnu.org>=
>> Date: =C2=A0 Sat Apr 4 09:59:16 2020 +0300
>>
>= ;> =C2=A0 =C2=A0 Fix face spec handling for 'default' "term= inal class"
>> =C2=A0 =C2=A0
>> =C2=A0 =C2=A0 * lis= p/faces.el (face-spec-choose): Reverse order of 'defaults'
>&= gt; =C2=A0 =C2=A0 and 'result' when generating attribute list, so t= hat the spec for
>> =C2=A0 =C2=A0 'default' "terminal= class" is indeed overridden by the actual
>> =C2=A0 =C2=A0 c= lass's spec, per the documentation. =C2=A0(Bug#40336)
>>
&= gt;> CCing Eli, hoping he can confirm.
>
> Confirmed, thanks= .

Thanks.=C2=A0 Merging this bug with Bug#40336.
--00000000000064395405adc81d8c-- From unknown Tue Jun 17 20:27:26 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 24 Sep 2020 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator