]> git.eshelyaron.com Git - emacs.git/commitdiff
grep.el fix for bug#8084.
authorGlenn Morris <rgm@gnu.org>
Thu, 3 Mar 2011 06:39:11 +0000 (22:39 -0800)
committerGlenn Morris <rgm@gnu.org>
Thu, 3 Mar 2011 06:39:11 +0000 (22:39 -0800)
* lisp/progmodes/grep.el (grep-highlight-matches): Doc fix.
(grep-process-setup): No highlighting without font-lock.

lisp/ChangeLog
lisp/progmodes/grep.el

index fe4847614c8cb2c1d1ae1e44bafcabfe154225c5..01a47fd4aaf76729391cb70f4118bde5196242de 100644 (file)
@@ -1,5 +1,8 @@
 2011-03-03  Glenn Morris  <rgm@gnu.org>
 
+       * progmodes/grep.el (grep-highlight-matches): Doc fix.
+       (grep-process-setup): No highlighting without font-lock.  (Bug#8084)
+
        * vc/vc-bzr.el (vc-bzr-state-heuristic): Handle dirstate entries
        with no parents.  (Bug#8025)
 
index 32ab52228f929db4d2262f12231bd64bb7a1dc7e..a4c9b7fccba97001544aaa8be25d4af64a63f528 100644 (file)
@@ -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'