Refill some copyright headers.
[bpt/emacs.git] / lisp / term / tty-colors.el
index 5622efa..bb69744 100644 (file)
@@ -1,7 +1,7 @@
 ;;; tty-colors.el --- color support for character terminals
 
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;;   2008, 2009, 2010, 2011  Free Software Foundation, Inc.
 
 ;; Author: Eli Zaretskii
 ;; Maintainer: FSF
@@ -9,10 +9,10 @@
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,9 +20,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
 ;; color.
 
 ;; `tty-defined-color-alist' is created at startup by calling the
-;; function `tty-color-define', defined below, passing it each
-;; supported color, its index, and its RGB values.  The standard list
-;; of colors supported by many Unix color terminals, including xterm,
-;; FreeBSD, and GNU/Linux, is supplied below in `tty-standard-colors'.
-;; If your terminal supports different or additional colors, call
-;; `tty-color-define' from your `.emacs' or `site-start.el'.  For
-;; more-or-less standard definitions of VGA text-mode colors, see the
-;; beginning of lisp/term/pc-win.el.
+;; function `tty-register-default-colors', defined below, which in
+;; turn calls `tty-color-define', passing it each supported color, its
+;; index, and its RGB values.  The standard list of colors supported
+;; by many Unix color terminals, including xterm, FreeBSD, and
+;; GNU/Linux, is supplied below in `tty-standard-colors'.  Some
+;; terminal-specific files in lisp/term define their own standard
+;; colors.  If your terminal supports different or additional colors,
+;; call `tty-color-define' from your `.emacs' or `site-start.el'.  For
+;; more-or-less standard definitions of VGA text-mode colors, see
+;; lisp/term/pc-win.el.
 
 ;;; Code:
 
-(defvar msdos-color-values)
-
 ;; The following list is taken from rgb.txt distributed with X.
 ;;
 ;; WARNING: Some colors, such as "lightred", do not appear in this
@@ -88,7 +86,7 @@
 ;; from the standard 8-bit X definitions (so the upper and lower bytes
 ;; of each value are actually identical).
 ;;
-(defvar color-name-rgb-alist
+(defconst color-name-rgb-alist
   '(("snow"            65535 64250 64250)
     ("ghostwhite"      63736 63736 65535)
     ("whitesmoke"      62965 62965 62965)
     ("lightgreen"      37008 61166 37008))
   "An alist of X color names and associated 16-bit RGB values.")
 
-(defvar tty-standard-colors
+(defconst tty-standard-colors
   '(("black"   0     0     0     0)
     ("red"     1 65535     0     0)
     ("green"   2     0 65535     0)
   "An alist of 8 standard tty colors, their indices and RGB values.")
 
 ;; This is used by term.c
-(defvar tty-color-mode-alist
+(defconst tty-color-mode-alist
   '((never . -1)
     (no . -1)
     (default . 0)
     (yes . 8))
   "An alist of supported standard tty color modes and their aliases.")
 
-(defvar tty-defined-color-alist nil
-  "An alist of defined terminal colors and their RGB values.
-
-See the docstring of `tty-color-alist' for the details.")
-
 (defun tty-color-alist (&optional frame)
   "Return an alist of colors supported by FRAME's terminal.
 FRAME defaults to the selected frame.
@@ -813,9 +806,7 @@ Value is the modified color alist for FRAME."
 
 (defun tty-register-default-colors ()
   "Register the default set of colors for a character terminal."
-  (let* ((colors (cond ((eq window-system 'pc)
-                       msdos-color-values)
-                      (t tty-standard-colors)))
+  (let* ((colors tty-standard-colors)
         (color (car colors)))
     (while colors
       (tty-color-define (car color) (cadr color) (cddr color))
@@ -1043,5 +1034,4 @@ A color is considered gray if the 3 components of its RGB value are equal."
       (setq colors (cdr colors)))
     count))
 
-;;; arch-tag: 84d5c3ef-ae22-4754-99ac-e6350c0967ae
 ;;; tty-colors.el ends here