# HG changeset patch # User Lute Kamstra # Date 1114679740 0 # Node ID e8076329ceee80d48b4fe188dd35cd084b98495d # Parent 787052160d8780a72e5bf3eea6d17e6044eab1d4 (grep-mode-font-lock-keywords): Use the font-lock-face property to highlight matches. diff -r 787052160d87 -r e8076329ceee lisp/progmodes/grep.el --- a/lisp/progmodes/grep.el Thu Apr 28 08:38:35 2005 +0000 +++ b/lisp/progmodes/grep.el Thu Apr 28 09:15:40 2005 +0000 @@ -1,7 +1,7 @@ ;;; grep.el --- run compiler as inferior of Emacs, parse error messages ;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2001, 2002, 2004 Free Software Foundation, Inc. +;; 2001, 2002, 2004, 2005 Free Software Foundation, Inc. ;; Author: Roland McGrath ;; Maintainer: FSF @@ -294,7 +294,10 @@ (2 compilation-line-face)) ;; Highlight grep matches and delete markers ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(\033\\[K\\)?\\)" - (2 grep-match-face) + ;; Refontification does not work after the markers have been + ;; deleted. So we use the font-lock-face property here as Font + ;; Lock does not clear that. + (2 (list 'face nil 'font-lock-face grep-match-face)) ((lambda (p)) (progn ;; Delete markers with `replace-match' because it updates