From eb07b3d9b3e05b6863fa61ea3b022f2184ec5c82 Mon Sep 17 00:00:00 2001 From: dalanicolai Date: Sat, 30 Oct 2021 17:32:17 +0200 Subject: [PATCH] Make list-colors-display sort list passed as argument * lisp/facemenu.el (list-colors-display): Don't skip sorting list of colors if it was passed as an argument. (Bug#51371) --- lisp/facemenu.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/facemenu.el b/lisp/facemenu.el index 7417bb12030..fe458b8c07b 100644 --- a/lisp/facemenu.el +++ b/lisp/facemenu.el @@ -551,8 +551,8 @@ If the optional argument CALLBACK is non-nil, it should be a function to call each time the user types RET or clicks on a color. The function should accept a single argument, the color name." (interactive) - (when (and (null list) (> (display-color-cells) 0)) - (setq list (list-colors-duplicates (defined-colors))) + (when (> (display-color-cells) 0) + (setq list (list-colors-duplicates (or list (defined-colors)))) (when list-colors-sort ;; Schwartzian transform with `(color key1 key2 key3 ...)'. (setq list (mapcar -- 2.39.5