GNU bug report logs -
#16789
24.3; load-theme ignores some faces the value of a attribute is nil
Previous Next
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: kuanyui <azazabc123 <at> 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).
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.