]> code.delx.au - gnu-emacs/commitdiff
In `widget-color--choose-action' quit *Color* window instead of deleting it
authorAndreas Politz <politza@hochschule-trier.de>
Thu, 20 Aug 2015 06:54:45 +0000 (08:54 +0200)
committerMartin Rudalics <rudalics@gmx.at>
Thu, 20 Aug 2015 06:54:45 +0000 (08:54 +0200)
* lisp/wid-edit.el (widget-color--choose-action): Quit *Color*
window instead of deleting it.

lisp/wid-edit.el

index ac2e981033165e5baca77e59687f86cf2ae84ae1..e98ac18fc5e908985680d272947f4b0808954267 100644 (file)
@@ -3706,9 +3706,9 @@ example:
        (widget-value-set ',(widget-get widget :parent) color)
        (let* ((buf (get-buffer "*Colors*"))
               (win (get-buffer-window buf 0)))
-         (bury-buffer buf)
-         (and win (> (length (window-list)) 1)
-              (delete-window win)))
+         (if win
+             (quit-window nil win)
+           (bury-buffer buf)))
        (pop-to-buffer ,(current-buffer))))))
 
 (defun widget-color-sample-face-get (widget)