Variable: ansi-color-for-comint-mode

ansi-color-for-comint-mode is a customizable variable defined in ansi-color.el.gz.

Value

t

Documentation

Determines what to do with comint output.

If nil, do nothing. If the symbol filter, then filter all SGR control sequences. If anything else (such as t), then translate SGR control sequences into text properties.

In order for this to have any effect, ansi-color-process-output must be in comint-output-filter-functions.

This can be used to enable colorized ls --color=yes output in shell buffers. You set this variable by calling one of: M-x ansi-color-for-comint-mode-on (ansi-color-for-comint-mode-on) M-x ansi-color-for-comint-mode-off (ansi-color-for-comint-mode-off) M-x ansi-color-for-comint-mode-filter (ansi-color-for-comint-mode-filter)

This variable was added, or its default value changed, in Emacs 23.2.

Probably introduced at or before Emacs version 21.1.

Source Code

;; Defined in /usr/src/emacs/lisp/ansi-color.el.gz
;; Convenience functions for comint modes (eg. shell-mode)


(defcustom ansi-color-for-comint-mode t
  "Determines what to do with comint output.
If nil, do nothing.
If the symbol `filter', then filter all SGR control sequences.
If anything else (such as t), then translate SGR control sequences
into text properties.

In order for this to have any effect, `ansi-color-process-output' must
be in `comint-output-filter-functions'.

This can be used to enable colorized ls --color=yes output
in shell buffers.  You set this variable by calling one of:
\\[ansi-color-for-comint-mode-on]
\\[ansi-color-for-comint-mode-off]
\\[ansi-color-for-comint-mode-filter]"
  :type '(choice (const :tag "Do nothing" nil)
		 (const :tag "Filter" filter)
		 (const :tag "Translate" t))
  :group 'ansi-colors
  :version "23.2")