`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)
(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.")))