changeset 45207:a8c6bd4220a5

(list-colors-display): Don't use `display-color-cells' unless the display class is one for which that info is relevant.
author Miles Bader <miles@gnu.org>
date Thu, 09 May 2002 18:04:27 +0000
parents c3037b7189b5
children 900e5db32b51
files lisp/facemenu.el
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/facemenu.el	Thu May 09 15:03:30 2002 +0000
+++ b/lisp/facemenu.el	Thu May 09 18:04:27 2002 +0000
@@ -487,10 +487,11 @@
 	(if (facemenu-color-equal (car l) (car (cdr l)))
 	    (setcdr l (cdr (cdr l)))
 	  (setq l (cdr l)))))
-    ;; Don't show more than what the display can handle.
-    (let ((lc (nthcdr (1- (display-color-cells)) list)))
-      (if lc
-	  (setcdr lc nil))))
+    (when (memq (display-visual-class) '(gray-scale pseudo-color direct-color))
+      ;; Don't show more than what the display can handle.
+      (let ((lc (nthcdr (1- (display-color-cells)) list)))
+	(if lc
+	    (setcdr lc nil)))))
   (with-output-to-temp-buffer "*Colors*"
     (save-excursion
       (set-buffer standard-output)