GNU bug report logs -
#18074
24.3.50; `default' clause in face specs with custom-theme-set-faces doesn't work as advertised
Previous Next
Reported by: Frank Terbeck <ft <at> bewatermyfriend.org>
Date: Mon, 21 Jul 2014 23:09:02 UTC
Severity: normal
Merged with 40336
Found in version 24.3.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Frank Terbeck <ft <at> bewatermyfriend.org> writes:
> The manual says this:
>
> ‘default’
> This element of SPEC doesn’t match any terminal; instead, it
> specifies defaults that apply to all terminals. This element, if
> used, must be the first element of SPEC. Each of the following
> elements can override any or all of these defaults.
>
> I tried using that in a theme, but the "override" part didn't work.
>
> So I did this from "emacs -Q" to see if something else in my setup was
> screwing things up for me:
>
> (deftheme foobar "Foobar theme")
> (custom-theme-set-faces 'foobar
> '(default ((default :slant normal
> :weight bold
> :foreground "white"
> :background "black")
> (t :foreground "blue"))))
>
> What I would expect is the `blue' foreground definition from the `t'
> clause to override the `white' foreground definition from the `default'
> clause. But alas, it doesn't work, the foreground remains white.
I can reproduce this in Emacs 27, but not with current master.
It looks like this was fixed in:
commit 05d365d3105371ec956f31f109a2de14c5cf67df
Author: Eli Zaretskii <eliz <at> gnu.org>
Date: Sat Apr 4 09:59:16 2020 +0300
Fix face spec handling for 'default' "terminal class"
* lisp/faces.el (face-spec-choose): Reverse order of 'defaults'
and 'result' when generating attribute list, so that the spec for
'default' "terminal class" is indeed overridden by the actual
class's spec, per the documentation. (Bug#40336)
CCing Eli, hoping he can confirm.
[Message part 2 (text/html, inline)]
This bug report was last modified 4 years and 267 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.