From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: kuanyui Newsgroups: gmane.emacs.bugs Subject: bug#16789: 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1392708851 14756 80.91.229.3 (18 Feb 2014 07:34:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Feb 2014 07:34:11 +0000 (UTC) To: 16789@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 18 08:34:18 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1WFfC5-0001EX-Oj for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Feb 2014 08:34:17 +0100 Original-Received: from localhost ([::1]:46854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFfC5-0004Nb-8U for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Feb 2014 02:34:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFfBw-0004N0-Jn for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2014 02:34:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFfBq-0003Vp-OZ for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2014 02:34:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56298) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFfBq-0003Vl-Kh for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2014 02:34:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WFfBq-0003ls-6w for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2014 02:34:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: kuanyui Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Feb 2014 07:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16789 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.139270881114450 (code B ref -1); Tue, 18 Feb 2014 07:34:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Feb 2014 07:33:31 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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) Original-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) 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-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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:85806 Archived-At: 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''