bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6332: Colors lost from list-colors-display


From: Juri Linkov
Subject: bug#6332: Colors lost from list-colors-display
Date: Mon, 14 Jun 2010 19:12:04 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)

>> I could now install the patch that adds the sorting option.  OK?
>
> I don't mind.

Committed.

I found another problem in `list-colors-display':
on a wide frame it uses a wrong value of `window-width'
because `list-colors-print' generates the color list
before it's displayed that might split the frame horizontally.

The following patch fixes this problem by displaying the output buffer
before generating its content (that is very fast thus there is no delay
and no bad visual effects):

Using parent branch file:///home/work/emacs/bzr/emacs/http-trunk/
=== modified file 'lisp/facemenu.el'
--- lisp/facemenu.el    2010-06-14 16:03:04 +0000
+++ lisp/facemenu.el    2010-06-14 16:11:18 +0000
@@ -600,9 +600,11 @@ (defun list-colors-display (&optional li
     (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.")))

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]