diff options
| author | Glenn Morris | 2011-03-02 22:39:11 -0800 |
|---|---|---|
| committer | Glenn Morris | 2011-03-02 22:39:11 -0800 |
| commit | a915d7a1e55a887ff5bd628369ca9f2c3b2fa367 (patch) | |
| tree | b19ca6223e5abba5f33154bf01f184797d7d14b8 /lisp | |
| parent | f96dc50fc0abc28c244a4095ca4d825e16a93eff (diff) | |
| download | emacs-a915d7a1e55a887ff5bd628369ca9f2c3b2fa367.tar.gz emacs-a915d7a1e55a887ff5bd628369ca9f2c3b2fa367.zip | |
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')
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/progmodes/grep.el | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fe4847614c8..01a47fd4aaf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2011-03-03 Glenn Morris <rgm@gnu.org> | 1 | 2011-03-03 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * progmodes/grep.el (grep-highlight-matches): Doc fix. | ||
| 4 | (grep-process-setup): No highlighting without font-lock. (Bug#8084) | ||
| 5 | |||
| 3 | * vc/vc-bzr.el (vc-bzr-state-heuristic): Handle dirstate entries | 6 | * vc/vc-bzr.el (vc-bzr-state-heuristic): Handle dirstate entries |
| 4 | with no parents. (Bug#8025) | 7 | with no parents. (Bug#8025) |
| 5 | 8 | ||
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', | |||
| 72 | 72 | ||
| 73 | Some grep programs are able to surround matches with special | 73 | Some grep programs are able to surround matches with special |
| 74 | markers in grep output. Such markers can be used to highlight | 74 | markers in grep output. Such markers can be used to highlight |
| 75 | matches in grep mode. | 75 | matches in grep mode. This requires `font-lock-mode' to be active |
| 76 | in grep buffers, so if you have globally disabled font-lock-mode, | ||
| 77 | you will not get highlighting. | ||
| 76 | 78 | ||
| 77 | This option sets the environment variable GREP_COLORS to specify | 79 | This option sets the environment variable GREP_COLORS to specify |
| 78 | markers for highlighting and GREP_OPTIONS to add the --color | 80 | 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'." | |||
| 462 | (when (eq grep-highlight-matches 'auto-detect) | 464 | (when (eq grep-highlight-matches 'auto-detect) |
| 463 | (grep-compute-defaults)) | 465 | (grep-compute-defaults)) |
| 464 | (unless (or (eq grep-highlight-matches 'auto-detect) | 466 | (unless (or (eq grep-highlight-matches 'auto-detect) |
| 467 | ;; Uses font-lock to parse color escapes. (Bug#8084) | ||
| 468 | (null font-lock-mode) | ||
| 465 | (null grep-highlight-matches)) | 469 | (null grep-highlight-matches)) |
| 466 | ;; `setenv' modifies `process-environment' let-bound in `compilation-start' | 470 | ;; `setenv' modifies `process-environment' let-bound in `compilation-start' |
| 467 | ;; Any TERM except "dumb" allows GNU grep to use `--color=auto' | 471 | ;; Any TERM except "dumb" allows GNU grep to use `--color=auto' |