From: Dave Love Date: Fri, 30 Jul 1999 18:30:04 +0000 (+0000) Subject: (list-colors-display): Make it work on ttys. X-Git-Tag: emacs-pretest-21.0.90~7303 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=16b6c96620319a25e97e43047a39d2295045e9a6;p=emacs.git (list-colors-display): Make it work on ttys. --- diff --git a/lisp/facemenu.el b/lisp/facemenu.el index 3036e44358c..d0892a99ac6 100644 --- a/lisp/facemenu.el +++ b/lisp/facemenu.el @@ -481,15 +481,16 @@ If the optional argument LIST is non-nil, it should be a list of 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)