* Bug in font-lock/grep interaction
@ 2010-10-14 13:02 Lars Magne Ingebrigtsen
2010-10-14 16:02 ` Glenn Morris
0 siblings, 1 reply; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-10-14 13:02 UTC (permalink / raw)
To: emacs-devel
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.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-10-14 16:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-14 13:02 Bug in font-lock/grep interaction Lars Magne Ingebrigtsen
2010-10-14 16:02 ` Glenn Morris
2010-10-14 16:28 ` Lars Magne Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).