]> code.delx.au - gnu-emacs/blobdiff - lisp/facemenu.el
Merge changes from emacs-23 branch.
[gnu-emacs] / lisp / facemenu.el
index 9e8299720a61b45ee87070a1f4d089baed8267d9..20b86676ea94ad3fffb34c0ce1652956b925a9ff 100644 (file)
@@ -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.")))