summaryrefslogtreecommitdiff
path: root/lisp/facemenu.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/facemenu.el')
-rw-r--r--lisp/facemenu.el19
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/facemenu.el b/lisp/facemenu.el
index 3036e44358c..d0892a99ac6 100644
--- a/lisp/facemenu.el
+++ b/lisp/facemenu.el
@@ -481,15 +481,16 @@ If the optional argument LIST is non-nil, it should be a list of
colors to display. Otherwise, this command computes a list
of colors that the current display can handle."
(interactive)
- (if (and (null list) window-system)
- (progn
- (setq list (x-defined-colors))
- ;; Delete duplicate colors.
- (let ((l list))
- (while (cdr l)
- (if (facemenu-color-equal (car l) (car (cdr l)))
- (setcdr l (cdr (cdr l)))
- (setq l (cdr l)))))))
+ (when (null list)
+ (setq list (if window-system
+ (x-defined-colors)
+ (tty-defined-colors)))
+ ;; Delete duplicate colors.
+ (let ((l list))
+ (while (cdr l)
+ (if (facemenu-color-equal (car l) (car (cdr l)))
+ (setcdr l (cdr (cdr l)))
+ (setq l (cdr l))))))
(with-output-to-temp-buffer "*Colors*"
(save-excursion
(set-buffer standard-output)