From unknown Thu Jun 19 14:00:28 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#16789 <16789@debbugs.gnu.org> To: bug#16789 <16789@debbugs.gnu.org> Subject: Status: 24.3; load-theme ignores some faces the value of a attribute is nil Reply-To: bug#16789 <16789@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:00:28 +0000 retitle 16789 24.3; load-theme ignores some faces the value of a attribute = is nil reassign 16789 emacs submitter 16789 kuanyui severity 16789 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 18 02:33:31 2014 Received: (at submit) by debbugs.gnu.org; 18 Feb 2014 07:33:31 +0000 Received: from localhost ([127.0.0.1]:57480 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WFfBJ-0003kx-1S for submit@debbugs.gnu.org; Tue, 18 Feb 2014 02:33:30 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41349) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WFdQU-0000Yx-60 for submit@debbugs.gnu.org; Tue, 18 Feb 2014 00:41:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFdQJ-0005Xh-3O for submit@debbugs.gnu.org; Tue, 18 Feb 2014 00:40:56 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:37509) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFdQJ-0005XX-0i for submit@debbugs.gnu.org; Tue, 18 Feb 2014 00:40:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFdQD-0005Xc-0v for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2014 00:40:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFdQ7-0005XA-1S for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2014 00:40:44 -0500 Received: from mail-pd0-x231.google.com ([2607:f8b0:400e:c02::231]:49823) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFdQ6-0005Wp-KN for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2014 00:40:38 -0500 Received: by mail-pd0-f177.google.com with SMTP id x10so15686814pdj.22 for ; Mon, 17 Feb 2014 21:40:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=ZFv/HwKalyx7/oJ+wG5i7IowTAz7s957PMnkI9wRTvM=; b=0aT7xK8e2+TtTcBOotdelrwer1XXZtq5BbqSr5cC5/Z+0H84NVbMl0JgHZQzn5GJcx 7pjG7AF8EOqSrUrpR7UxcfLAz2jh1Bi7bRqP0mKVrWJMblMX4eAYn/9hrMyEKr8Qsv8w mMVvDtukfM/XLqMjGPp+9vkQyrAWRGFQhQmWFFMpMp6969oVQcsXtaCRSanu0YbpKqJG oVlhHDiPz/pvrvPxum5q6TP3ik4k/JxURk+iWsXHSZQO8MWbIN6utLyHs4VW7zNPHcg6 3KDSvlRJ4mvalE1r529I5ljjxNycciHc7tcew9cDNMNJYgkxL54pB7Xy6citwChHlcFj JFIg== X-Received: by 10.66.121.164 with SMTP id ll4mr30465970pab.129.1392702026224; Mon, 17 Feb 2014 21:40:26 -0800 (PST) Received: from kuanyui-laptop.site (36-233-20-83.dynamic-ip.hinet.net. [36.233.20.83]) by mx.google.com with ESMTPSA id vn10sm51789798pbc.21.2014.02.17.21.40.24 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Mon, 17 Feb 2014 21:40:25 -0800 (PST) From: kuanyui To: bug-gnu-emacs@gnu.org Subject: 24.3; load-theme ignores some faces the value of a attribute is nil Date: Tue, 18 Feb 2014 13:40:20 +0800 Message-ID: <874n3xf06z.fsf@kuanyui-laptop.site> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 18 Feb 2014 02:33:26 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -3.8 (---) load-theme is invalid if a value of a attribute in defface is nil. Or more accurately, it seems to ignore some faces under some situation. Define a theme, for example, OUR-THEME.el Magit inherit its diff faces from diff.el, like this: (defface magit-diff-add '((t :inherit diff-added)) "Face for lines in a diff that have been added." :group 'magit-faces) If you've defined a face for `diff-added` like this: `(diff-added ((((class color) (min-colors 89)) (:foreground "#008700" :background "#d7ff5f" :bold t)))) But now you want to *remove* the :background of `magit-diff-add`, so add a nil on :background : `(magit-diff-add ((((class color) (min-colors 89)) (:foreground "#008700" :background nil :bold t)))) Then, restart Emacs (to ensure Emacs would be "clean"), `require 'magit` and `load-theme OUR-THEME`; you will found load-theme IGNORES the whole line defination of magit-diff-add, And magit-diff-add still only inherits diff-added. * Most strange is, if you `find-file` OUR-THEME.el and M-x eval-buffer, the :background nil TAKE EFFECT. * I ask this issue because this strange behavior is an obstacle on defining theme. I've tested on my system and write some test, and reproducible. ----- kuanyui 20140218 In GNU Emacs 24.3.1 (x86_64-suse-linux-gnu, GTK+ Version 3.10.4) of 2014-01-23 on cloud107 Windowing system distributor `The X.Org Foundation', version 11.0.11403901 System Description: openSUSE 13.1 (Bottle) (x86_64) Configured using: `configure '--with-pop' '--without-hesiod' '--with-kerberos' '--with-kerberos5' '--with-xim' '--with-wide-int' '--enable-autodepend' '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--with-x' '--with-sound' '--with-xpm' '--with-jpeg' '--with-tiff' '--with-gif' '--with-png' '--with-rsvg' '--with-dbus' '--without-gpm' '--with-x-toolkit=gtk3' '--x-includes=/usr/include' '--x-libraries=/usr/lib64' '--with-xft' '--with-libotf' '--with-m17n-flt' '--build=x86_64-suse-linux' 'build_alias=x86_64-suse-linux' 'CFLAGS=-fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g -D_GNU_SOURCE -std=gnu89 -pipe -Wno-pointer-sign -Wno-unused-variable -Wno-unused-label -Wno-unprototyped-calls -fno-optimize-sibling-calls -DSYSTEM_PURESIZE_EXTRA=55000 -DSITELOAD_PURESIZE_EXTRA=10000 ' 'LDFLAGS=-Wl,-O2 -Wl,--hash-size=65521'' From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 18 10:10:00 2014 Received: (at 16789) by debbugs.gnu.org; 18 Feb 2014 15:10:00 +0000 Received: from localhost ([127.0.0.1]:58569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WFmJ6-0002MA-0K for submit@debbugs.gnu.org; Tue, 18 Feb 2014 10:10:00 -0500 Received: from mtaout24.012.net.il ([80.179.55.180]:55414) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WFmJ2-0002Lu-Ep for 16789@debbugs.gnu.org; Tue, 18 Feb 2014 10:09:57 -0500 Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0N1700E005MFOG00@mtaout24.012.net.il> for 16789@debbugs.gnu.org; Tue, 18 Feb 2014 17:08:37 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N1700C2Y62D9V50@mtaout24.012.net.il>; Tue, 18 Feb 2014 17:08:37 +0200 (IST) Date: Tue, 18 Feb 2014 17:09:57 +0200 From: Eli Zaretskii Subject: Re: bug#16789: 24.3; load-theme ignores some faces the value of a attribute is nil In-reply-to: <874n3xf06z.fsf@kuanyui-laptop.site> X-012-Sender: halo1@inter.net.il To: kuanyui Message-id: <83mwho78ze.fsf@gnu.org> References: <874n3xf06z.fsf@kuanyui-laptop.site> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 16789 Cc: 16789@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii 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 (+) > From: kuanyui > Date: Tue, 18 Feb 2014 13:40:20 +0800 > > > load-theme is invalid if a value of a attribute in defface is nil. > Or more accurately, it seems to ignore some faces under some situation. > > > Define a theme, for example, OUR-THEME.el > > Magit inherit its diff faces from diff.el, like this: > > (defface magit-diff-add > '((t :inherit diff-added)) > "Face for lines in a diff that have been added." > :group 'magit-faces) > > If you've defined a face for `diff-added` like this: > > `(diff-added ((((class color) (min-colors 89)) > (:foreground "#008700" :background "#d7ff5f" :bold t)))) > > But now you want to *remove* the :background of `magit-diff-add`, > so add a nil on :background : > > `(magit-diff-add ((((class color) (min-colors 89)) > (:foreground "#008700" :background nil :bold t)))) > > Then, restart Emacs (to ensure Emacs would be "clean"), `require 'magit` > and `load-theme OUR-THEME`; you will found load-theme IGNORES the whole > line defination of magit-diff-add, And magit-diff-add still only > inherits diff-added. > > * Most strange is, if you `find-file` OUR-THEME.el and M-x eval-buffer, > the :background nil TAKE EFFECT. * > > I ask this issue because this strange behavior is an obstacle on > defining theme. Isn't this the consequence of this change: *** Face specs set via Custom themes now replace the `defface' spec rather than inheriting from it (as do face specs set via Customize). From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 19 00:57:09 2014 Received: (at 16789) by debbugs.gnu.org; 19 Feb 2014 05:57:10 +0000 Received: from localhost ([127.0.0.1]:59364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WG09d-0006LQ-D4 for submit@debbugs.gnu.org; Wed, 19 Feb 2014 00:57:09 -0500 Received: from mail-lb0-f175.google.com ([209.85.217.175]:44288) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WG09a-0006Kt-Bu for 16789@debbugs.gnu.org; Wed, 19 Feb 2014 00:57:07 -0500 Received: by mail-lb0-f175.google.com with SMTP id p9so12815949lbv.6 for <16789@debbugs.gnu.org>; Tue, 18 Feb 2014 21:57:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=F3MEWUN7hMHCySn2whQ76zzJz0+soSMibJyjkv3A7Es=; b=KlljPUt6S3tpv6JaZnJiN5OYH7Nz0iUOPSBPMGlYqGDHZpwgVF/xJuArDofj7s4VIX QWrtsMhhfyUOChqewGP5+91AHJ/ID25BdyECp1bdY43XE17K4aRte+cSdGD3Q0qXRMj0 ISWJo9w9eYdIFILhJkdBPO2oe6pu6GQ6x24Cyfo5JFnfxpNZqURnXjr76SFbhPb2V/7/ VAfcdRU5kMzEPh57cmzQd7WanweXECNclrjwo84cCwuEmkiaKPkS9+AoSZiup5upKHMC yTJJ7CNbiXSeXVjctprckDyTIzJB9BMdiDzs1pEZ175HWmPC7xD/H/krf7A63Y/Szg+1 VOZQ== X-Received: by 10.152.87.228 with SMTP id bb4mr25065265lab.15.1392789420183; Tue, 18 Feb 2014 21:57:00 -0800 (PST) Received: from leviafan (128-70-201-173.broadband.corbina.ru. [128.70.201.173]) by mx.google.com with ESMTPSA id v5sm35619174laj.0.2014.02.18.21.56.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Feb 2014 21:56:59 -0800 (PST) From: Alex Kost To: kuanyui Subject: Re: bug#16789: 24.3; load-theme ignores some faces the value of a attribute is nil References: <874n3xf06z.fsf@kuanyui-laptop.site> Date: Wed, 19 Feb 2014 09:56:57 +0400 In-Reply-To: <874n3xf06z.fsf@kuanyui-laptop.site> (kuanyui's message of "Tue, 18 Feb 2014 13:40:20 +0800") Message-ID: <87iosbk5li.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 16789 Cc: 16789@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) kuanyui (2014-02-18 09:40 +0400) wrote: > load-theme is invalid if a value of a attribute in defface is nil. > Or more accurately, it seems to ignore some faces under some situation. > > > Define a theme, for example, OUR-THEME.el > > Magit inherit its diff faces from diff.el, like this: > > (defface magit-diff-add > '((t :inherit diff-added)) > "Face for lines in a diff that have been added." > :group 'magit-faces) > > If you've defined a face for `diff-added` like this: > > `(diff-added ((((class color) (min-colors 89)) > (:foreground "#008700" :background "#d7ff5f" :bold t)))) > > But now you want to *remove* the :background of `magit-diff-add`, > so add a nil on :background : > > `(magit-diff-add ((((class color) (min-colors 89)) > (:foreground "#008700" :background nil :bold t)))) > > Then, restart Emacs (to ensure Emacs would be "clean"), `require 'magit` > and `load-theme OUR-THEME`; you will found load-theme IGNORES the whole > line defination of magit-diff-add, And magit-diff-add still only > inherits diff-added. > > * Most strange is, if you `find-file` OUR-THEME.el and M-x eval-buffer, > the :background nil TAKE EFFECT. * > > I ask this issue because this strange behavior is an obstacle on > defining theme. It is so in 24.3.1, but it works OK in 24.3.50. You may look at for details. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 19 02:37:53 2014 Received: (at control) by debbugs.gnu.org; 19 Feb 2014 07:37:53 +0000 Received: from localhost ([127.0.0.1]:59422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WG1j5-0000qN-Pw for submit@debbugs.gnu.org; Wed, 19 Feb 2014 02:37:52 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:54047 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WG1j1-0000q2-0T for control@debbugs.gnu.org; Wed, 19 Feb 2014 02:37:47 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1WG1j0-0007lK-Fb for control@debbugs.gnu.org; Wed, 19 Feb 2014 02:37:46 -0500 Date: Wed, 19 Feb 2014 02:37:46 -0500 Message-Id: Subject: control message for bug 16789 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.6 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -5.6 (-----) forcemerge 16658 16789 From unknown Thu Jun 19 14:00:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 19 Mar 2014 11:24:03 +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