all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Kost <alezost@gmail.com>
To: kuanyui <azazabc123@gmail.com>
Cc: 16789@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	[thread overview]
Message-ID: <87iosbk5li.fsf@gmail.com> (raw)
In-Reply-To: <874n3xf06z.fsf@kuanyui-laptop.site> (kuanyui's message of "Tue,  18 Feb 2014 13:40:20 +0800")

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.






      parent reply	other threads:[~2014-02-19  5:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18  5:40 bug#16789: 24.3; load-theme ignores some faces the value of a attribute is nil kuanyui
2014-02-18 15:09 ` Eli Zaretskii
2014-02-19  5:56 ` Alex Kost [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87iosbk5li.fsf@gmail.com \
    --to=alezost@gmail.com \
    --cc=16789@debbugs.gnu.org \
    --cc=azazabc123@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.