Mercurial > emacs
comparison lisp/facemenu.el @ 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 (1999-07-30) |
parents | 76ea51acad22 |
children | 7581eb34e7ff |
comparison
equal
deleted
inserted
replaced
25137:1bee9402f747 | 25138:b005bf702615 |
---|---|
479 "Display names of defined colors, and show what they look like. | 479 "Display names of defined colors, and show what they look like. |
480 If the optional argument LIST is non-nil, it should be a list of | 480 If the optional argument LIST is non-nil, it should be a list of |
481 colors to display. Otherwise, this command computes a list | 481 colors to display. Otherwise, this command computes a list |
482 of colors that the current display can handle." | 482 of colors that the current display can handle." |
483 (interactive) | 483 (interactive) |
484 (if (and (null list) window-system) | 484 (when (null list) |
485 (progn | 485 (setq list (if window-system |
486 (setq list (x-defined-colors)) | 486 (x-defined-colors) |
487 ;; Delete duplicate colors. | 487 (tty-defined-colors))) |
488 (let ((l list)) | 488 ;; Delete duplicate colors. |
489 (while (cdr l) | 489 (let ((l list)) |
490 (if (facemenu-color-equal (car l) (car (cdr l))) | 490 (while (cdr l) |
491 (setcdr l (cdr (cdr l))) | 491 (if (facemenu-color-equal (car l) (car (cdr l))) |
492 (setq l (cdr l))))))) | 492 (setcdr l (cdr (cdr l))) |
493 (setq l (cdr l)))))) | |
493 (with-output-to-temp-buffer "*Colors*" | 494 (with-output-to-temp-buffer "*Colors*" |
494 (save-excursion | 495 (save-excursion |
495 (set-buffer standard-output) | 496 (set-buffer standard-output) |
496 (let (s) | 497 (let (s) |
497 (while list | 498 (while list |