all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#18074: 24.3.50; `default' clause in face specs with custom-theme-set-faces doesn't work as advertised
@ 2014-07-21 21:53 Frank Terbeck
  2014-07-22 23:48 ` bug#18074: Reproduced with current HEAD of `emacs-24' branch Frank Terbeck
  2020-08-26 12:50 ` bug#18074: 24.3.50; `default' clause in face specs with custom-theme-set-faces doesn't work as advertised Mauro Aranda
  0 siblings, 2 replies; 5+ messages in thread
From: Frank Terbeck @ 2014-07-21 21:53 UTC (permalink / raw)
  To: 18074


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 asked gnu.emacs.help whether I was misinterpreting things, but the
person who felt compelled to reply agreed that this seems to be a bug.

So here's my report of the issue.

Regards, Frank



In GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
 of 2013-12-25 on jim, modified by Debian
 (emacs-snapshot package, version 2:20131221-1)
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
System Description:	Debian GNU/Linux 7.6 (wheezy)

Configured using:
 `configure --build x86_64-linux-gnu --host x86_64-linux-gnu
 --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var --infodir=/usr/share/info/emacs-snapshot
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.3.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3.50/site-lisp:/usr/share/emacs/site-lisp
 --with-crt-dir=/usr/lib/x86_64-linux-gnu/ --with-x=yes
 --with-x-toolkit=gtk3 --with-imagemagick=yes 'CFLAGS=-DDEBIAN
 -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' CPPFLAGS=-D_FORTIFY_SOURCE=2
 'LDFLAGS=-g -Wl,--as-needed -znocombreloc''

Important settings:
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
( d e f t h e e <backspace> m e SPC f o o b a r SPC 
" F o o b a r SPC t h e m e " ) <return> <backspace> 
C-j ( c u s t o m e <backspace> - t h e m e - s e t 
- f a c e s <return> <tab> ' f o o b a r <return> <tab> 
( <backspace> ' ( d e f a u l t SPC ( ( d e f a u l 
t SPC : s l a n g <backspace> t SPC n o r m a l SPC 
: w e i g h t SPC d e f a u l t C-w C-w <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> b o l d SPC : f o r e g r o u n d SPC " 
w h i t e " SPC : b a c k g r o u n d " SPC <backspace> 
<backspace> SPC " b l a c k " ) <return> ( t SPC : 
f o r e g r o u n d SPC " b l u e " ) ) ) ) C-j M-x 
r e p o r t <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
kill-region: The mark is not set now, so there is no region [2 times]

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils time-date tooltip electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#18074: Reproduced with current HEAD of `emacs-24' branch
  2014-07-21 21:53 bug#18074: 24.3.50; `default' clause in face specs with custom-theme-set-faces doesn't work as advertised Frank Terbeck
@ 2014-07-22 23:48 ` Frank Terbeck
  2020-08-26 12:50 ` bug#18074: 24.3.50; `default' clause in face specs with custom-theme-set-faces doesn't work as advertised Mauro Aranda
  1 sibling, 0 replies; 5+ messages in thread
From: Frank Terbeck @ 2014-07-22 23:48 UTC (permalink / raw)
  To: 18074

I realise, that I reported the issue with a not entirely up-to-date
version of emacs. So tonight, I built an emacs from version control;
i.e. "M-x version" not yields:

  GNU Emacs 24.3.92.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.2) of
  2014-07-23 on jim

This is actually based on:

  commit b9535f929dc5534ba4a6868802947ebcf79ffd0c

...which is the HEAD of the `emacs-24' branch from the git repository at
savannah at the time this email is being written.

It appears that the bug is present in this version as well.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#18074: 24.3.50; `default' clause in face specs with custom-theme-set-faces doesn't work as advertised
  2014-07-21 21:53 bug#18074: 24.3.50; `default' clause in face specs with custom-theme-set-faces doesn't work as advertised Frank Terbeck
  2014-07-22 23:48 ` bug#18074: Reproduced with current HEAD of `emacs-24' branch Frank Terbeck
@ 2020-08-26 12:50 ` Mauro Aranda
  2020-08-26 13:07   ` Eli Zaretskii
  1 sibling, 1 reply; 5+ messages in thread
From: Mauro Aranda @ 2020-08-26 12:50 UTC (permalink / raw)
  To: Frank Terbeck; +Cc: 18074

[-- Attachment #1: Type: text/plain, Size: 1653 bytes --]

Frank Terbeck <ft@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@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.

[-- Attachment #2: Type: text/html, Size: 2142 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#18074: 24.3.50; `default' clause in face specs with custom-theme-set-faces doesn't work as advertised
  2020-08-26 12:50 ` bug#18074: 24.3.50; `default' clause in face specs with custom-theme-set-faces doesn't work as advertised Mauro Aranda
@ 2020-08-26 13:07   ` Eli Zaretskii
  2020-08-26 13:51     ` Mauro Aranda
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2020-08-26 13:07 UTC (permalink / raw)
  To: Mauro Aranda; +Cc: ft, 18074

> From: Mauro Aranda <maurooaranda@gmail.com>
> Date: Wed, 26 Aug 2020 09:50:34 -0300
> Cc: 18074@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
> 
> > (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@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.

Confirmed, thanks.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#18074: 24.3.50; `default' clause in face specs with custom-theme-set-faces doesn't work as advertised
  2020-08-26 13:07   ` Eli Zaretskii
@ 2020-08-26 13:51     ` Mauro Aranda
  0 siblings, 0 replies; 5+ messages in thread
From: Mauro Aranda @ 2020-08-26 13:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Frank Terbeck, 18074

[-- Attachment #1: Type: text/plain, Size: 1437 bytes --]

unarchive 40336
forcemerge 40336 18074
quit

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Mauro Aranda <maurooaranda@gmail.com>
>> Date: Wed, 26 Aug 2020 09:50:34 -0300
>> Cc: 18074@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
>>
>> > (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@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.
>
> Confirmed, thanks.

Thanks.  Merging this bug with Bug#40336.

[-- Attachment #2: Type: text/html, Size: 2228 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-08-26 13:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-21 21:53 bug#18074: 24.3.50; `default' clause in face specs with custom-theme-set-faces doesn't work as advertised Frank Terbeck
2014-07-22 23:48 ` bug#18074: Reproduced with current HEAD of `emacs-24' branch Frank Terbeck
2020-08-26 12:50 ` bug#18074: 24.3.50; `default' clause in face specs with custom-theme-set-faces doesn't work as advertised Mauro Aranda
2020-08-26 13:07   ` Eli Zaretskii
2020-08-26 13:51     ` Mauro Aranda

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.