Function: ansi-color-make-face
ansi-color-make-face is a byte-compiled function defined in
ansi-color.el.gz.
Signature
(ansi-color-make-face PROPERTY COLOR)
Documentation
Return a face with PROPERTY set to COLOR.
PROPERTY can be either symbol foreground or symbol background.
For Emacs, we just return the cons cell (PROPERTY . COLOR).
Source Code
;; Defined in /usr/src/emacs/lisp/ansi-color.el.gz
;; This function helps you look for overlapping overlays. This is
;; useful in comint-buffers. Overlapping overlays should not happen!
;; A possible cause for bugs are the markers. If you create an overlay
;; up to the end of the region, then that end might coincide with the
;; process-mark. As text is added BEFORE the process-mark, the overlay
;; will keep growing. Therefore, as more overlays are created later on,
;; there will be TWO OR MORE overlays covering the buffer at that point.
;; This function helps you check your buffer for these situations.
; (defun ansi-color-debug-overlays ()
; (interactive)
; (let ((pos (point-min)))
; (while (< pos (point-max))
; (if (<= 2 (length (overlays-at pos)))
; (progn
; (goto-char pos)
; (error "%d overlays at %d" (length (overlays-at pos)) pos))
; (let (message-log-max)
; (message "Reached %d." pos)))
; (setq pos (next-overlay-change pos)))))
(defun ansi-color-make-face (property color)
"Return a face with PROPERTY set to COLOR.
PROPERTY can be either symbol `foreground' or symbol `background'.
For Emacs, we just return the cons cell (PROPERTY . COLOR)."
(cond ((eq property 'foreground)
(cons 'foreground-color color))
((eq property 'background)
(cons 'background-color color))
(t
(cons property color))))