X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/f0bf7c8e5525fb4f964530c17399c3c987a79927..fea9cabd275c3d5809b824a6e4a1446441a6793e:/lisp/facemenu.el diff --git a/lisp/facemenu.el b/lisp/facemenu.el index 9e8299720a..20b86676ea 100644 --- a/lisp/facemenu.el +++ b/lisp/facemenu.el @@ -503,9 +503,9 @@ Output values for saturation and value are integers in [0..100] range." `nil' means default implementation-dependent order (defined in `x-colors'). `name' sorts by color name. `rgb' sorts by red, green, blue components. -`rgb-dist' sorts by the RGB distance to the specified color. +`(rgb-dist . COLOR)' sorts by the RGB distance to the specified color. `hsv' sorts by hue, saturation, value. -`hsv-dist' sorts by the HVS distance to the specified color +`(hsv-dist . COLOR)' sorts by the HSV distance to the specified color and excludes grayscale colors." :type '(choice (const :tag "Unsorted" nil) (const :tag "Color Name" name) @@ -600,9 +600,11 @@ You can change the color sort order by customizing `list-colors-sort'." (with-current-buffer buf (erase-buffer) (setq truncate-lines t) + ;; Display buffer before generating content to allow + ;; `list-colors-print' to get the right window-width. + (pop-to-buffer buf) (list-colors-print list callback) - (set-buffer-modified-p nil)) - (pop-to-buffer buf)) + (set-buffer-modified-p nil))) (if callback (message "Click on a color to select it.")))