summaryrefslogtreecommitdiff
path: root/lisp/progmodes/grep.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2011-03-02 22:39:11 -0800
committerGlenn Morris <rgm@gnu.org>2011-03-02 22:39:11 -0800
commita915d7a1e55a887ff5bd628369ca9f2c3b2fa367 (patch)
treeb19ca6223e5abba5f33154bf01f184797d7d14b8 /lisp/progmodes/grep.el
parentf96dc50fc0abc28c244a4095ca4d825e16a93eff (diff)
downloademacs-a915d7a1e55a887ff5bd628369ca9f2c3b2fa367.tar.gz
grep.el fix for bug#8084.
* lisp/progmodes/grep.el (grep-highlight-matches): Doc fix. (grep-process-setup): No highlighting without font-lock.
Diffstat (limited to 'lisp/progmodes/grep.el')
-rw-r--r--lisp/progmodes/grep.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 32ab52228f9..a4c9b7fccba 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -72,7 +72,9 @@ SYMBOL should be one of `grep-command', `grep-template',
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.
+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 GREP_OPTIONS to add the --color
@@ -462,6 +464,8 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
(when (eq grep-highlight-matches 'auto-detect)
(grep-compute-defaults))
(unless (or (eq grep-highlight-matches 'auto-detect)
+ ;; Uses font-lock to parse color escapes. (Bug#8084)
+ (null font-lock-mode)
(null grep-highlight-matches))
;; `setenv' modifies `process-environment' let-bound in `compilation-start'
;; Any TERM except "dumb" allows GNU grep to use `--color=auto'