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: Brennan Vincent
Subject: bug#61521: "default" is now the first item returned from (font-faces), breaking various code.
Date: Tue, 14 Feb 2023 19:52:23 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1

I suspect frame-face-alist needs to be changed in a similar way.

On 2023-02-14 19:31, Brennan Vincent wrote:
> 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)))
> 
> 
> Also, org-html-htmlize-generate-css does not work when default comes first in
> the list (as it skips processing all fonts after default).
> 
> I am not sure why this was changed and if the change was intentional, but it 
> can
> be fixed by changing the "<" to a ">" in the last line of face-list, so I
> suspect it might have been a mistake.
> 
> diff --git lisp/faces.el lisp/faces.el
> index 4933b495a6c..e998dc504e5 100644
> --- lisp/faces.el
> +++ lisp/faces.el
> @@ -199,7 +199,7 @@ face-list
>      (maphash (lambda (face spec)
>                 (push `(,(car spec) . ,face) faces))
>               face--new-frame-defaults)
> -    (mapcar #'cdr (sort faces (lambda (f1 f2) (< (car f1) (car f2)))))))
> +    (mapcar #'cdr (sort faces (lambda (f1 f2) (> (car f1) (car f2)))))))
> 
>  (defun make-face (face)
>    "Define a new face with name FACE, a symbol.






reply via email to

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