/[emacs]/emacs/lisp/facemenu.el
ViewVC logotype

Diff of /emacs/lisp/facemenu.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.56 by rms, Wed Jan 2 22:56:04 2002 UTC revision 1.57 by eliz, Fri Jan 25 13:11:49 2002 UTC
# Line 516  If the optional argument LIST is non-nil Line 516  If the optional argument LIST is non-nil
516  colors to display.  Otherwise, this command computes a list  colors to display.  Otherwise, this command computes a list
517  of colors that the current display can handle."  of colors that the current display can handle."
518    (interactive)    (interactive)
519    (when (null list)    (when (and (null list) (> (display-color-cells) 0))
520      (setq list (defined-colors))      (setq list (defined-colors))
521      ;; Delete duplicate colors.      ;; Delete duplicate colors.
522      (let ((l list))      (let ((l list))
523        (while (cdr l)        (while (cdr l)
524          (if (facemenu-color-equal (car l) (car (cdr l)))          (if (facemenu-color-equal (car l) (car (cdr l)))
525              (setcdr l (cdr (cdr l)))              (setcdr l (cdr (cdr l)))
526            (setq l (cdr l))))))            (setq l (cdr l)))))
527        ;; Don't show more than what the display can handle.
528        (let ((lc (nthcdr (1- (display-color-cells)) list)))
529          (if lc
530              (setcdr lc nil))))
531    (with-output-to-temp-buffer "*Colors*"    (with-output-to-temp-buffer "*Colors*"
532      (save-excursion      (save-excursion
533        (set-buffer standard-output)        (set-buffer standard-output)

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26