From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii 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 17:09:57 +0200 Message-ID: <83mwho78ze.fsf@gnu.org> References: <874n3xf06z.fsf@kuanyui-laptop.site> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1392736217 15885 80.91.229.3 (18 Feb 2014 15:10:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Feb 2014 15:10:17 +0000 (UTC) Cc: 16789@debbugs.gnu.org To: kuanyui Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 18 16:10:25 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 1WFmJT-0002GQ-3S for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Feb 2014 16:10:23 +0100 Original-Received: from localhost ([::1]:50073 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFmJS-0008Qf-HW for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Feb 2014 10:10:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFmJH-0008Oj-Nt for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2014 10:10:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFmJA-0002uQ-Du for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2014 10:10:11 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57387) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFmJA-0002sv-Bf for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2014 10:10:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WFmJ9-0002MV-IF for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2014 10:10:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Feb 2014 15:10:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16789 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16789-submit@debbugs.gnu.org id=B16789.13927362009066 (code B ref 16789); Tue, 18 Feb 2014 15:10:03 +0000 Original-Received: (at 16789) by debbugs.gnu.org; 18 Feb 2014 15:10:00 +0000 Original-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 Original-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 Original-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) Original-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) In-reply-to: <874n3xf06z.fsf@kuanyui-laptop.site> X-012-Sender: halo1@inter.net.il 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:85818 Archived-At: > 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).