From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mauro Aranda Newsgroups: gmane.emacs.bugs Subject: bug#18074: 24.3.50; `default' clause in face specs with custom-theme-set-faces doesn't work as advertised Date: Wed, 26 Aug 2020 09:50:34 -0300 Message-ID: References: <87d2cye5u6.fsf@jim.voodoo.lan> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ad9d1205adc744b7" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13201"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 18074@debbugs.gnu.org To: Frank Terbeck Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 26 14:51:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAutS-0003Gc-KK for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 Aug 2020 14:51:10 +0200 Original-Received: from localhost ([::1]:43244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAutR-0000qv-4R for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 Aug 2020 08:51:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45170) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAutK-0000qb-Ic for bug-gnu-emacs@gnu.org; Wed, 26 Aug 2020 08:51:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54408) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kAutK-00008S-9X for bug-gnu-emacs@gnu.org; Wed, 26 Aug 2020 08:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kAutK-0006sk-77 for bug-gnu-emacs@gnu.org; Wed, 26 Aug 2020 08:51:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87d2cye5u6.fsf@jim.voodoo.lan> Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Aug 2020 12:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18074 X-GNU-PR-Package: emacs Original-Received: via spool by 18074-submit@debbugs.gnu.org id=B18074.159844625426440 (code B ref 18074); Wed, 26 Aug 2020 12:51:02 +0000 Original-Received: (at 18074) by debbugs.gnu.org; 26 Aug 2020 12:50:54 +0000 Original-Received: from localhost ([127.0.0.1]:37721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAutB-0006sO-W5 for submit@debbugs.gnu.org; Wed, 26 Aug 2020 08:50:54 -0400 Original-Received: from mail-wr1-f49.google.com ([209.85.221.49]:36170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAut9-0006sA-RA for 18074@debbugs.gnu.org; Wed, 26 Aug 2020 08:50:52 -0400 Original-Received: by mail-wr1-f49.google.com with SMTP id x7so1697448wro.3 for <18074@debbugs.gnu.org>; Wed, 26 Aug 2020 05:50:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=T3qp+5QWeXCmeqycS+3/pBv0T4CNAN3qyqrgvkd66rI=; b=r7qlChdxmdf3CVCgiGms1qCnUO3oQBETP+BNKGRfqf1h3sJcv+h5GrjTBiunc51QUd 403IyEo7TbNr6SIYtb3io2FXAixY+ImsNw14zMKQECGxberE49okqIiAWbjEkEYYaIb9 a4k/kphqrrjk0tH65HnnJdf+PFEmhzKcLMo5R/H6u80rJJQ1S8BCdi+cUSI+EXYyHink 7GoTAcUivW5wfrq4Y6Uu8V434s7U5P45csEP3GQWIqoVx6cDn8FYjPfn8VMsYXld8hOq MrkgLmR08ktp1uSRuDVQr+jikixfKVokVnsgGalvdbsHB2IGc3RroPh/LR8fwCVCrB6s CDMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=T3qp+5QWeXCmeqycS+3/pBv0T4CNAN3qyqrgvkd66rI=; b=fAJp+RVlWS+Ap5J0d7GrXoSHMrBVPPHaWhBTHH2wO/nNRbh1G/z/bGxFnS2EQbOntc kn8Fj3pc2gc/zcJI79bNpqXfPI1DVIpzN2EAK3G5hYMYvpVKwhLB/wb2zA60bV17E/U1 d5OArTBfcJJ8Ui6e0x8gOpFL0Dhdt6jbRblKWmfQuusdym/Scg7qI+0ED3p/S0rnNO9C kHQrzBqLACWJWQXh+kUnxm22Jz1lST9g6VqwRi62pp0TaAcAedQTipm3QDh8I6KIKJVr 9mi8bb8jx/8zg2GcMhJUsXtWyGoUy6IJn/mCf66mKJAvwacSu/CRAEcliVpWFiX73YCS 9CMA== X-Gm-Message-State: AOAM532xMVx0W3QId1UlcXvcCb2XMP3Z0v8y6yD8uRZtVmp7UWhx99fk dHTjkZXkW4k6Bs1Q74c3GdgNSAIpILi1EptJpKA= X-Google-Smtp-Source: ABdhPJzBGNe5GoSKljEt7qiJAlaY5O7XwhaWE5WZTAygmNVzjF57RSHLbGP2mcUiacd3zFANEwig+owaDD+VzoJC3fA= X-Received: by 2002:adf:e411:: with SMTP id g17mr16436769wrm.77.1598446245877; Wed, 26 Aug 2020 05:50:45 -0700 (PDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:186434 Archived-At: --000000000000ad9d1205adc744b7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Frank Terbeck writes: > The manual says this: > > =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. > > I tried using that in a theme, but the "override" part didn't work. > > So I did this from "emacs -Q" to see if something else in my setup was > screwing things up for me: > > (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. --000000000000ad9d1205adc744b7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Frank Terbeck <ft@bewatermyfriend.org> writes:

> The manual says this:<= br>>
> =C2=A0 =E2=80=98default=E2=80=99
> =C2=A0 =C2=A0 =C2= =A0 =C2=A0This element of SPEC doesn=E2=80=99t match any terminal; instead,= it
> =C2=A0 =C2=A0 =C2=A0 =C2=A0specifies defaults that apply to all= terminals. This element, if
> =C2=A0 =C2=A0 =C2=A0 =C2=A0used, must = be the first element of SPEC. Each of the following
> =C2=A0 =C2=A0 = =C2=A0 =C2=A0elements can override any or all of these defaults.
>> I tried using that in a theme, but the "override" part didn= 't work.
>
> So I did this from "emacs -Q" to see= if something else in my setup was
> screwing things up for me:
&g= t;
> (deftheme foobar "Foobar theme")
> (custom-theme= -set-faces 'foobar
> =C2=A0 '(default ((default :slant normal=
> =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 "white"
> = =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"))))
>
> What I= would expect is the `blue' foreground definition from the `t'
&= gt; clause to override the `white' foreground definition from the `defa= ult'
> clause. But alas, it doesn't work, the foreground rema= ins white.

I can reproduce this in Emacs 27, but not with current ma= ster.

It looks like this was fixed in:
commit 05d365d3105371ec956= f31f109a2de14c5cf67df
Author: Eli Zaretskii <eliz@gnu.org>
Date: =C2=A0 Sat Apr 4 09:59:16 2020 +0300<= br>
=C2=A0 =C2=A0 Fix face spec handling for 'default' "ter= minal class"
=C2=A0 =C2=A0
=C2=A0 =C2=A0 * lisp/faces.el (face-= spec-choose): Reverse order of 'defaults'
=C2=A0 =C2=A0 and '= ;result' when generating attribute list, so that the spec for
=C2=A0= =C2=A0 'default' "terminal class" is indeed overridden b= y the actual
=C2=A0 =C2=A0 class's spec, per the documentation. =C2= =A0(Bug#40336)

CCing Eli, hoping he can confirm.
--000000000000ad9d1205adc744b7--