[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: highlighting problems for M-x grep
From: |
Dan Nicolaescu |
Subject: |
Re: highlighting problems for M-x grep |
Date: |
Mon, 7 Feb 2005 07:10:17 -0800 |
Richard Stallman <address@hidden> writes:
> On a Fedora Core 3 system M-x grep does not eliminate all the terminfo
> strings in the *grep* buffer.
>
> Can you try to debug this?
This patch seems to fix the problem, it works both on a system there
grep emits ^[[K and on a system where it does not.
May I check it in?
Index: grep.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/grep.el,v
retrieving revision 1.32
diff -c -3 -p -c -r1.32 grep.el
*** grep.el 22 Jan 2005 15:43:55 -0000 1.32
--- grep.el 7 Feb 2005 15:08:00 -0000
*************** Notice that using \\[next-error] or \\[c
*** 253,259 ****
'(("^\\(.+?\\)[: \t]+\
\\([0-9]+\\)\\([.:]?\\)\\([0-9]+\\)?\
\\(?:-\\(?:\\([0-9]+\\)\\3\\)?\\.?\\([0-9]+\\)?\\)?[: \t]" 1 (2 . 5) (4 . 6))
!
("^\\(.+?\\)[:(]+\\([0-9]+\\)\\([:)]\\).*?\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)"
1 2
;; Calculate column positions (beg . end) of first grep match on a line
((lambda ()
--- 253,259 ----
'(("^\\(.+?\\)[: \t]+\
\\([0-9]+\\)\\([.:]?\\)\\([0-9]+\\)?\
\\(?:-\\(?:\\([0-9]+\\)\\3\\)?\\.?\\([0-9]+\\)?\\)?[: \t]" 1 (2 . 5) (4 . 6))
!
("^\\(.+?\\)[:(]+\\([0-9]+\\)\\([:)]\\).*?\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(\033\\[K\\)?\\)"
1 2
;; Calculate column positions (beg . end) of first grep match on a line
((lambda ()
*************** Notice that using \\[next-error] or \\[c
*** 293,299 ****
(1 compilation-warning-face)
(2 compilation-line-face))
;; Highlight grep matches and delete markers
! ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)"
(2 grep-match-face)
((lambda (p))
(progn
--- 293,299 ----
(1 compilation-warning-face)
(2 compilation-line-face))
;; Highlight grep matches and delete markers
! ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(\033\\[K\\)?\\)"
(2 grep-match-face)
((lambda (p))
(progn