bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16789: 24.3; load-theme ignores some faces the value of a attribute


From: Eli Zaretskii
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

> From: kuanyui <azazabc123@gmail.com>
> 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).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]