GNU bug report logs - #61521
"default" is now the first item returned from (font-faces), breaking various code.

Previous Next

Package: emacs;

Reported by: Brennan Vincent <brennan <at> umanwizard.com>

Date: Wed, 15 Feb 2023 00:32:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 61521 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Brennan Vincent <brennan <at> umanwizard.com>
Cc: 61521 <at> debbugs.gnu.org
Subject: Re: bug#61521: "default" is now the first item returned from
 (font-faces), breaking various code.
Date: Wed, 15 Feb 2023 09:00:44 +0000
[Message part 1 (text/plain, inline)]
>>> Various code seems to expect "default" to be the /last/ item in the 
>>> list returned by that function, not the first. For example, this 
>>> comment in faces.el:
>>
>> Can you perhaps clarify what you mean by "that function"?  The subject 
>> line of your bug report mentions 'font-faces', but no such function 
>> exists in Emacs.
>
> Apologies: I meant to write "face-list".
>

Thanks.  It seems the change you describe is not a recent one: the first 
element of the list returned by 'face-list' is 'default' in Emacs 27, 28, 
29 and 30.  (This is caused by e3b8ddd500, since which frame faces are 
stored in a hash table instead of an alist.)

Given this, and the fact that the docstring of 'face-list' does not 
specify the order in which the faces are returned, it's not clear to me 
that there is a bug here.  Code that assumes a given order should probably 
be fixed.

This bug report was last modified 2 years and 177 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.