* lisp/facemenu.el (list-colors-display): Call `pop-to-buffer' before
authorJuri Linkov <juri@jurta.org>
Wed, 16 Jun 2010 21:33:54 +0000 (00:33 +0300)
committerJuri Linkov <juri@jurta.org>
Wed, 16 Jun 2010 21:33:54 +0000 (00:33 +0300)
`list-colors-print'.  (Bug#6332)

lisp/ChangeLog
lisp/facemenu.el

index 18c99d4..b59e5f2 100644 (file)
@@ -1,3 +1,8 @@
+2010-06-16  Juri Linkov  <juri@jurta.org>
+
+       * facemenu.el (list-colors-display): Call `pop-to-buffer' before
+       `list-colors-print'.  (Bug#6332)
+
 2010-06-16  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/macroexp.el (macroexpand-all-1): Don't handle `lambda'
index 19b5967..20b8667 100644 (file)
@@ -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.")))