Fix order of faces in 'face-list'

* lisp/faces.el (frame-face-alist, face-list): Sort faces in
decreasing order of face IDs.  Patch by Brennan Vincent
<brennan@umanwizard.com>.  (Bug#61521)

Copyright-paperwork-exempt: yes
This commit is contained in:
Eli Zaretskii 2023-02-17 10:27:39 +02:00
parent b44a7ff85d
commit a555abc56d

View file

@ -191,7 +191,7 @@ For internal use only."
(let ((face-id (car (gethash face face--new-frame-defaults))))
(push `(,face-id ,face . ,spec) faces)))
(frame--face-hash-table frame))
(mapcar #'cdr (sort faces (lambda (f1 f2) (< (car f1) (car f2)))))))
(mapcar #'cdr (sort faces (lambda (f1 f2) (> (car f1) (car f2)))))))
(defun face-list ()
"Return a list of all defined faces."
@ -199,7 +199,7 @@ For internal use only."
(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.