GNU bug report logs - #16789
24.3; load-theme ignores some faces the value of a attribute is nil

Previous Next

Package: emacs;

Reported by: kuanyui <azazabc123 <at> gmail.com>

Date: Tue, 18 Feb 2014 07:34:02 UTC

Severity: normal

Merged with 16658

Found in version 24.3

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alex Kost <alezost <at> gmail.com>
To: kuanyui <azazabc123 <at> gmail.com>
Cc: 16789 <at> debbugs.gnu.org
Subject: bug#16789: 24.3; load-theme ignores some faces the value of a attribute is nil
Date: Wed, 19 Feb 2014 09:56:57 +0400
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 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16658> for details.





This bug report was last modified 11 years and 94 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.