aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLute Kamstra2005-04-28 09:15:40 +0000
committerLute Kamstra2005-04-28 09:15:40 +0000
commit5ad24c0b2e4def8a68ae421956726d811751d3de (patch)
tree3bbcfd6022eac0e1428859a0faa7359af0e0df6a
parentf4cfd81af9ca9e0339171af9dff795610e268aea (diff)
downloademacs-5ad24c0b2e4def8a68ae421956726d811751d3de.tar.gz
emacs-5ad24c0b2e4def8a68ae421956726d811751d3de.zip
(grep-mode-font-lock-keywords): Use the font-lock-face property to
highlight matches.
-rw-r--r--lisp/progmodes/grep.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index ab705212397..4f5ffe0d23b 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -1,7 +1,7 @@
1;;; grep.el --- run compiler as inferior of Emacs, parse error messages 1;;; grep.el --- run compiler as inferior of Emacs, parse error messages
2 2
3;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4;; 2001, 2002, 2004 Free Software Foundation, Inc. 4;; 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
5 5
6;; Author: Roland McGrath <roland@gnu.org> 6;; Author: Roland McGrath <roland@gnu.org>
7;; Maintainer: FSF 7;; Maintainer: FSF
@@ -294,7 +294,10 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
294 (2 compilation-line-face)) 294 (2 compilation-line-face))
295 ;; Highlight grep matches and delete markers 295 ;; Highlight grep matches and delete markers
296 ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(\033\\[K\\)?\\)" 296 ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\(\033\\[K\\)?\\)"
297 (2 grep-match-face) 297 ;; Refontification does not work after the markers have been
298 ;; deleted. So we use the font-lock-face property here as Font
299 ;; Lock does not clear that.
300 (2 (list 'face nil 'font-lock-face grep-match-face))
298 ((lambda (p)) 301 ((lambda (p))
299 (progn 302 (progn
300 ;; Delete markers with `replace-match' because it updates 303 ;; Delete markers with `replace-match' because it updates