diff options
author | Miles Bader <miles@gnu.org> | 2002-05-09 18:05:10 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2002-05-09 18:05:10 +0000 |
commit | d2596700276b3381512ace615dfa02659c766bfb (patch) | |
tree | 4d39ffdedeb3058699d49368fc8aff0a65f41a99 | |
parent | a1d8dc878edd16fe25b54281f36c7fb07ee7110e (diff) | |
download | emacs-d2596700276b3381512ace615dfa02659c766bfb.tar.gz |
(list-colors-display): Don't use `display-color-cells' unless the
display class is one for which that info is relevant.
-rw-r--r-- | lisp/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/facemenu.el | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ba2aa932259..84893cb55e3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2002-05-10 Miles Bader <miles@gnu.org> + + * facemenu.el (list-colors-display): Don't use + `display-color-cells' unless the display class is one for which + that info is relevant. + 2002-05-07 Simon Josefsson <jas@extundo.com> * mail/smtpmail.el (smtpmail-send-it): Use user-mail-address from diff --git a/lisp/facemenu.el b/lisp/facemenu.el index 96c73e77bbd..c7e9cdd3a53 100644 --- a/lisp/facemenu.el +++ b/lisp/facemenu.el @@ -487,10 +487,11 @@ of colors that the current display can handle." (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) |