Stefan Monnier <[EMAIL PROTECTED]> writes: >> When I do M-x grep and use >> >> grep -nH -e "(define-minor-mode" lisp/*.el >> >> I get a *grep* buffer with occurrences of "(define-minor-mode" in lisp >> files. Every time that I tried, most lines in this buffer give the >> text "(define-minor-mode" the grep-match-face, but a few lines don't >> fontify "(define-minor-mode". The strange thing is that the lines >> that don't fontify "(define-minor-mode" are different every time I >> invoke grep. > > The problem, most likely is the following: > > 1 - grep sends a partial line like > > foo:123:toto \033[01;41mMATCH\033[00m > > 2 - font-lock fontifies this, which adds a face property and removes > the markers, so the text is now: > > foo:123:toto MATCH > > 3 - grep sends the rest of the line > > bar baz\n > > so the complete line is now > > foo:123:toto MATCH bar baz\n > > 4 - font-lock is triggered again to fontify the added text, but it works > a line-at-a-time so it re-fontifies the whole line, what begins by > removing the `face' property and never re-adds it since the merkers are > now lost. > > So the patch below should fix the problem because it uses the font-lock-face > property which is not cleared by font-lock. > > If you find the patch works, please just install it for me,
Your patch fixes the problem I described. I'll add a comment explaining the need to use font-lock-face and commit it. Lute. _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel