all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#61521: "default" is now the first item returned from (font-faces), breaking various code.
@ 2023-02-15  0:31 Brennan Vincent
  2023-02-15  0:52 ` Brennan Vincent
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Brennan Vincent @ 2023-02-15  0:31 UTC (permalink / raw)
  To: 61521

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.






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

end of thread, other threads:[~2023-02-18  7:40 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-15  0:31 bug#61521: "default" is now the first item returned from (font-faces), breaking various code Brennan Vincent
2023-02-15  0:52 ` Brennan Vincent
2023-02-15  1:00 ` Gregory Heytings
2023-02-15  1:06   ` Brennan Vincent
2023-02-15  9:00     ` Gregory Heytings
2023-02-15 13:43       ` Eli Zaretskii
2023-02-15 14:11         ` Gregory Heytings
2023-02-17 22:17           ` Kai Ma
2023-02-18  6:49             ` Eli Zaretskii
2023-02-18  6:54               ` Kai Ma
2023-02-18  7:40                 ` Eli Zaretskii
2023-02-15 12:58 ` Eli Zaretskii
2023-02-15 14:01   ` Brennan Vincent
2023-02-15 14:19     ` Gregory Heytings
2023-02-15 14:24     ` Eli Zaretskii
2023-02-15 16:19       ` Brennan Vincent
2023-02-17  8:29         ` Eli Zaretskii

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.