changeset 25138:b005bf702615

(list-colors-display): Make it work on ttys.
author Dave Love <fx@gnu.org>
date Fri, 30 Jul 1999 18:30:04 +0000
parents 1bee9402f747
children fde300f58ed8
files lisp/facemenu.el
diffstat 1 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/facemenu.el	Fri Jul 30 18:03:23 1999 +0000
+++ b/lisp/facemenu.el	Fri Jul 30 18:30:04 1999 +0000
@@ -481,15 +481,16 @@
 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)