[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in font-lock/grep interaction
From: |
Lars Magne Ingebrigtsen |
Subject: |
Bug in font-lock/grep interaction |
Date: |
Thu, 14 Oct 2010 15:02:57 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) |
If you have
(setq font-lock-global-modes nil)
then grep won't work:
grep -nH -e stream *.el
comint.el:701:a TCP connection to be opened via
`open-network-[01;31mstream[m'. If there is already
comint.el:727:a TCP connection to be opened via
`open-network-[01;31mstream[m'. If there is already
comint.el:761: (open-network-[01;31mstream[m name buffer (car
command) (cdr command))
(That is, the text is unreadable and `C-x `' won't jump to the lines.)
The following seems to fix the problem, but is probably the wrong solution:
=== modified file 'lisp/progmodes/grep.el'
*** lisp/progmodes/grep.el 2010-05-21 20:43:04 +0000
--- lisp/progmodes/grep.el 2010-10-14 13:01:41 +0000
***************
*** 456,463 ****
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)
! (null grep-highlight-matches))
;; `setenv' modifies `process-environment' let-bound in
`compilation-start'
;; Any TERM except "dumb" allows GNU grep to use `--color=auto'
(setenv "TERM" "emacs-grep")
--- 456,464 ----
Set up `compilation-exit-message-function' and run `grep-setup-hook'."
(when (eq grep-highlight-matches 'auto-detect)
(grep-compute-defaults))
! (when (and (not (or (eq grep-highlight-matches 'auto-detect)
! (null grep-highlight-matches)))
! font-lock-global-modes)
;; `setenv' modifies `process-environment' let-bound in
`compilation-start'
;; Any TERM except "dumb" allows GNU grep to use `--color=auto'
(setenv "TERM" "emacs-grep")
--
(domestic pets only, the antidote for overdose, milk.)
address@hidden * Lars Magne Ingebrigtsen
- Bug in font-lock/grep interaction,
Lars Magne Ingebrigtsen <=