grep-highlight-matches

grep-highlight-matches is a variable defined in `grep.el'.
Its value is
auto-detect


Documentation:
Use special markers to highlight grep matches.

Some grep programs are able to surround matches with special
markers in grep output. Such markers can be used to highlight
matches in grep mode. This requires `font-lock-mode' to be active
in grep buffers, so if you have globally disabled font-lock-mode,
you will not get highlighting.

This option sets the environment variable GREP_COLORS to specify
markers for highlighting and adds the --color option in front of
any explicit grep options before starting the grep.

When this option is `auto', grep uses `--color' to highlight
matches only when it outputs to a terminal (when `grep' is the last
command in the pipe), thus avoiding the use of any potentially-harmful
escape sequences when standard output goes to a file or pipe.

To make grep highlight matches even into a pipe, you need the option
`always' that forces grep to use `--color=always' to unconditionally
output escape sequences.

In interactive usage, the actual value of this variable is set up
by `grep-compute-defaults' when the default value is `auto-detect'.
To change the default value, use Customize or call the function
`grep-apply-setting'.

You can customize this variable.

This variable was introduced, or its default value was changed, in version 22.1 of Emacs.