bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Sat, 18 Feb 2023 08:49:29 +0200

> From: Kai Ma <justksqsf@gmail.com>
> Cc: Eli Zaretskii <eliz@gnu.org>,  brennan@umanwizard.com,
>   61521@debbugs.gnu.org
> Date: Sat, 18 Feb 2023 06:17:25 +0800
> 
> My config becomes broken after pulling this change: the child frame of
> vertico-posframe does not appear under certain themes, and signals
> errors like:
> 
>   Error in post-command-hook (vertico--exhibit): (error "Invalid face" 
> consult-separator)
>   Error in post-command-hook (vertico--exhibit): (error "Invalid face" 
> hl-todo)
> 
> I'm not sure if this is a downstream issue, but this problem can be
> solved by either reverting this commit or removing the nreverse in
> x-create-frame-with-faces:
> 
> diff --git a/lisp/faces.el b/lisp/faces.el
> index 4933b495a6c..e91107e98cc 100644
> --- a/lisp/faces.el
> +++ b/lisp/faces.el
> @@ -2226,7 +2226,7 @@ x-create-frame-with-faces
>      (unwind-protect
>       (progn
>         (x-setup-function-keys frame)
> -       (dolist (face (nreverse (face-list)))
> +       (dolist (face (face-list)))
>           (face-spec-recalc face frame))
>         (x-handle-reverse-video frame parameters)
>         (frame-set-background-mode frame t)
> 
> This piece of code (w/ nreverse) was written as part of the hash table
> rewrite, and at that time (face-list) did not sort its results.  I don't
> know why nreverse is significant here though.

Which change are you talking about?  Please clarify.

The original problem was solved recently on the emacs-29 branch by
reversing the order in which face-list sorts the faces, to make it
similar to what we had before the hash table rewrite.  So there should
be no reason to change any other code anywhere else.

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]