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

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

bug#8454: deftheme, :inherit & overriding existing values


From: Christoph Scholtes
Subject: bug#8454: deftheme, :inherit & overriding existing values
Date: Mon, 09 May 2011 21:18:25 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10

On 5/8/2011 2:14 PM, Chong Yidong wrote:

OK, I found a bug in the case where defface is called after loading a
theme with settings for that face.  The defface settings were not being
applied; I've checked a fix into the trunk.  However, I'm not sure this
is the issue you are talking about, since this bug was not specific to
the :inherit property.  Could you check if your problem is fixed?

One possible source of confusion, which may apply to Dirk-Jan's report,
is that :inherit only tells Emacs to consult the parent face if a face
attribute is unspecified.  If the attribute is specified, it overrides
the inheritance.  So if your Custom theme want to "cancel out", say, any
existing foreground attribute setting, you need something like

  '(froob ((t (:foreground unspecified :inherit parent-face))))

This did not fix it for me.

I think Dirk-Jan and I have the same issue, though, which is the behavior of :inherit.

One example from my custom theme:

 '(erc-default-face ((t (:inherit default))))

This is supposed to inherit from

 '(default ((t (:background "#3f3f3f" :foreground "#dcdccc"))))

but it does not work.

This is probably related to what you describe above, but I don't really understand it. foregound in erc-default-face is unspecified, right? Should the inherit get the attributes from default or not?

I figured out a way to make my custom theme work, though. Loading it through customize does not work, but if I open the theme file and eval the buffer, it works and erc shows the my custom faces. Maybe this helps to troubleshoot the problem?

Christoph





reply via email to

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