From e020fb59a3a7df1c47ef6bdae4b49eef4bab6c1b Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 17 Jun 2010 00:33:54 +0300 Subject: * lisp/facemenu.el (list-colors-display): Call `pop-to-buffer' before `list-colors-print'. (Bug#6332) --- lisp/ChangeLog | 5 +++++ lisp/facemenu.el | 6 ++++-- 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 + + * facemenu.el (list-colors-display): Call `pop-to-buffer' before + `list-colors-print'. (Bug#6332) + 2010-06-16 Stefan Monnier * 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."))) -- cgit v1.2.1