From a555abc56d5270cebe94f904189526d7ac433a94 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 17 Feb 2023 10:27:39 +0200 Subject: [PATCH] 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 . (Bug#61521) Copyright-paperwork-exempt: yes --- lisp/faces.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/faces.el b/lisp/faces.el index 4933b495a6c..d1a7881e396 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -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. -- 2.39.2