[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Overriding some face attributes without changing the default(s) one(
Re: Overriding some face attributes without changing the default(s) one(s)
Sun, 08 Jun 2014 10:02:56 +0400
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
Alexandre LAURENT (2014-06-08 03:09 +0400) wrote:
> On Sat, Jun 7, 2014 at 8:52 PM, Michael Heerdegen
> <address@hidden> wrote:
>> Just configure the face to use the bold attribute, and leave all other
>> attributes emtpy.
> Well, weird because that's exactly what I did but maybe not the right way.
> In my case, I configure this face in a theme like this:
> ;; ...
> '(whitespace-line ((t (:weight bold))))
> ;; ...
> If I open a C file, for each long line, the whole line still uses the
> default whitespace-line face + bold (which prevents the syntax
>> What you want works well for me without doing anything special. The
>> `whitespace-line' face is "merged" with the normal font locking, and I
>> see the colors from syntax highlighting, but in bold for long lines.
> Good to know, I'm going to test with an empty emacs config + the
> configuration of the whitespace-line face.
>> I'm not completely sure if that works in older Emacs version.
> I'm using emacs 24.3.1 so this should work I suppose.
The problem is that in emacs 24.3.1 default face specifications are
merged with the face specifications defined by a theme, so what you see
is a "bold" defined by your theme and the bits from a default spec. In
emacs 24.4 (and in the current trunk) your theme would work as expected:
if a face is themed, then the default spec is ignored completely.
If you want to make emacs 24.3.1 display only themed faces, you have to
override all the bits of the default spec in your theme (which sounds
horrible IMO), so for example the following should "free" your
'(whitespace-line ((t (:background unspecified :weight bold))))
If you are interested, I wrote something about that here:
Also there were some related bugs, for example:
I hope it was helpful.