[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#61521: "default" is now the first item returned from (font-faces), b
From: |
Eli Zaretskii |
Subject: |
bug#61521: "default" is now the first item returned from (font-faces), breaking various code. |
Date: |
Wed, 15 Feb 2023 16:24:46 +0200 |
> From: Brennan Vincent <brennan@umanwizard.com>
> Date: Wed, 15 Feb 2023 09:01:31 -0500
> Cc: 61521@debbugs.gnu.org
>
> > On Feb 15, 2023, at 07:58, Eli Zaretskii <eliz@gnu.org> wrote:
> >
> >
> >>
> >> Date: Tue, 14 Feb 2023 19:31:30 -0500
> >> From: Brennan Vincent <brennan@umanwizard.com>
> >>
> >> 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:
> >>
> >> ;; The `reverse' is so that `default' goes first.
> >> (dolist (face (nreverse (face-list)))
> >
> > That comment is obsolete and needs to be changed (and the call to
> > nreverse should perhaps be removed).
>
> If the order returned by face-list is not guaranteed, then why does it do
> sorting at all?
Good question. AFAICT, the sorting was added when we switched from
storing faces in alists to storing them in hash tables. It probably
sorted faces to be more compatible with what face-list returned before
the switch to hash table. So I suspect the order we have now is
simply a bug, and we do need to change the order of sorting to get
back the original order.
Gregory, any counter-arguments?
- bug#61521: "default" is now the first item returned from (font-faces), breaking various code., (continued)
- bug#61521: "default" is now the first item returned from (font-faces), breaking various code., Gregory Heytings, 2023/02/15
- bug#61521: "default" is now the first item returned from (font-faces), breaking various code., Eli Zaretskii, 2023/02/15
- bug#61521: "default" is now the first item returned from (font-faces), breaking various code., Gregory Heytings, 2023/02/15
- bug#61521: "default" is now the first item returned from (font-faces), breaking various code., Kai Ma, 2023/02/17
- bug#61521: "default" is now the first item returned from (font-faces), breaking various code., Eli Zaretskii, 2023/02/18
- bug#61521: "default" is now the first item returned from (font-faces), breaking various code., Kai Ma, 2023/02/18
- bug#61521: "default" is now the first item returned from (font-faces), breaking various code., Eli Zaretskii, 2023/02/18
bug#61521: "default" is now the first item returned from (font-faces), breaking various code., Eli Zaretskii, 2023/02/15
- bug#61521: "default" is now the first item returned from (font-faces), breaking various code., Brennan Vincent, 2023/02/15
- bug#61521: "default" is now the first item returned from (font-faces), breaking various code., Gregory Heytings, 2023/02/15
- bug#61521: "default" is now the first item returned from (font-faces), breaking various code.,
Eli Zaretskii <=
- bug#61521: "default" is now the first item returned from (font-faces), breaking various code., Brennan Vincent, 2023/02/15
- bug#61521: "default" is now the first item returned from (font-faces), breaking various code., Eli Zaretskii, 2023/02/17