# HG changeset patch # User Miles Bader # Date 1020967467 0 # Node ID a8c6bd4220a53d222b49e5f47075a445273d0652 # Parent c3037b7189b5f8ba6fe58cb39cce7f417f67009a (list-colors-display): Don't use `display-color-cells' unless the display class is one for which that info is relevant. diff -r c3037b7189b5 -r a8c6bd4220a5 lisp/facemenu.el --- 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)