summaryrefslogtreecommitdiff
path: root/lisp/facemenu.el
diff options
context:
space:
mode:
authorDave Love <fx@gnu.org>1999-07-30 18:30:04 +0000
committerDave Love <fx@gnu.org>1999-07-30 18:30:04 +0000
commit16b6c96620319a25e97e43047a39d2295045e9a6 (patch)
tree7d19136bda337c2411422acc9a6ef9a23bae7988 /lisp/facemenu.el
parente59176e26409472734d30b2103b43d536924b89c (diff)
downloademacs-16b6c96620319a25e97e43047a39d2295045e9a6.tar.gz
(list-colors-display): Make it work on ttys.
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)