X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/ce327e48a158a1b59c6ccf54c26763c3460ca268..5d8e0d43b0fdc1b67f745e66c1539c5135fb2808:/lisp/ansi-color.el diff --git a/lisp/ansi-color.el b/lisp/ansi-color.el index 98eeca325b..ff7edf40dc 100644 --- a/lisp/ansi-color.el +++ b/lisp/ansi-color.el @@ -1,7 +1,6 @@ ;;; ansi-color.el --- translate ANSI escape sequences into faces -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999-2011 Free Software Foundation, Inc. ;; Author: Alex Schroeder ;; Maintainer: Alex Schroeder @@ -133,8 +132,18 @@ Parameter Color 37 47 white This vector is used by `ansi-color-make-color-map' to create a color -map. This color map is stored in the variable `ansi-color-map'." - :type '(vector string string string string string string string string) +map. This color map is stored in the variable `ansi-color-map'. + +Each element may also be a cons cell where the car and cdr specify the +foreground and background colors, respectively." + :type '(vector (choice color (cons color color)) + (choice color (cons color color)) + (choice color (cons color color)) + (choice color (cons color color)) + (choice color (cons color color)) + (choice color (cons color color)) + (choice color (cons color color)) + (choice color (cons color color))) :set 'ansi-color-map-update :initialize 'custom-initialize-default :group 'ansi-colors) @@ -529,7 +538,8 @@ The face definitions are based upon the variables (mapc (function (lambda (e) (aset ansi-color-map index - (ansi-color-make-face 'foreground e)) + (ansi-color-make-face 'foreground + (if (consp e) (car e) e))) (setq index (1+ index)) )) ansi-color-names-vector) ;; background attributes @@ -537,7 +547,8 @@ The face definitions are based upon the variables (mapc (function (lambda (e) (aset ansi-color-map index - (ansi-color-make-face 'background e)) + (ansi-color-make-face 'background + (if (consp e) (cdr e) e))) (setq index (1+ index)) )) ansi-color-names-vector) ansi-color-map)) @@ -594,5 +605,4 @@ ESCAPE-SEQ is a SGR control sequences such as \\033[34m. The parameter (provide 'ansi-color) -;; arch-tag: 00726118-9432-44fd-b72d-d2af7591c99c ;;; ansi-color.el ends here