From: Eli Zaretskii Date: Fri, 17 Feb 2023 08:27:39 +0000 (+0200) Subject: Fix order of faces in 'face-list' X-Git-Tag: emacs-29.0.90~426^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a555abc56d5270cebe94f904189526d7ac433a94;p=emacs.git 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 --- 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.