summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2010-06-17 00:33:54 +0300
committerJuri Linkov <juri@jurta.org>2010-06-17 00:33:54 +0300
commite020fb59a3a7df1c47ef6bdae4b49eef4bab6c1b (patch)
tree1d8d7c990a85363c44f020879c2d65d36674c0bf
parent49b2e83db4e53168cfdef4caf0c9ea975397e044 (diff)
downloademacs-e020fb59a3a7df1c47ef6bdae4b49eef4bab6c1b.tar.gz
* lisp/facemenu.el (list-colors-display): Call `pop-to-buffer' before
`list-colors-print'. (Bug#6332)
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/facemenu.el6
2 files changed, 9 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 18c99d4ebf0..b59e5f2708c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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'
diff --git a/lisp/facemenu.el b/lisp/facemenu.el
index 19b5967215a..20b86676ea9 100644
--- a/lisp/facemenu.el
+++ b/lisp/facemenu.el
@@ -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.")))