1 |
;;; grep.el --- run compiler as inferior of Emacs, parse error messages |
;;; grep.el --- run compiler as inferior of Emacs, parse error messages |
2 |
|
|
3 |
;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 98, 1999, 2001, 02, 2004 |
;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
4 |
;; Free Software Foundation, Inc. |
;; 2001, 2002, 2004 Free Software Foundation, Inc. |
5 |
|
|
6 |
;; Author: Roland McGrath <roland@gnu.org> |
;; Author: Roland McGrath <roland@gnu.org> |
7 |
;; Maintainer: FSF |
;; Maintainer: FSF |
252 |
\\(?:-\\(?:\\([0-9]+\\)\\3\\)?\\.?\\([0-9]+\\)?\\)?[:) \t]" 1 (2 . 5) (4 . 6)) |
\\(?:-\\(?:\\([0-9]+\\)\\3\\)?\\.?\\([0-9]+\\)?\\)?[:) \t]" 1 (2 . 5) (4 . 6)) |
253 |
("^\\(.+?\\)[:(]+\\([0-9]+\\)\\([:)]\\).*?\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)" |
("^\\(.+?\\)[:(]+\\([0-9]+\\)\\([:)]\\).*?\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)" |
254 |
1 2 |
1 2 |
255 |
|
;; Calculate column positions (beg . end) of first grep match on a line |
256 |
((lambda () |
((lambda () |
257 |
(setq compilation-error-screen-columns nil) |
(setq compilation-error-screen-columns nil) |
258 |
(- (match-beginning 5) (match-end 3) 8)) |
(- (match-beginning 5) (match-end 3) 8)) |
259 |
. |
. |
260 |
(lambda () (- (match-end 5) (match-end 3) 8))) |
(lambda () (- (match-end 5) (match-end 3) 8)))) |
|
nil nil |
|
|
(4 (list 'face nil 'invisible t 'intangible t)) |
|
|
(5 (list 'face compilation-column-face)) |
|
|
(6 (list 'face nil 'invisible t 'intangible t)) |
|
|
;; highlight other matches on the same line |
|
|
("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)" |
|
|
nil nil |
|
|
(1 (list 'face nil 'invisible t 'intangible t)) |
|
|
(2 (list 'face compilation-column-face) t) |
|
|
(3 (list 'face nil 'invisible t 'intangible t)))) |
|
261 |
("^Binary file \\(.+\\) matches$" 1 nil nil 1)) |
("^Binary file \\(.+\\) matches$" 1 nil nil 1)) |
262 |
"Regexp used to match grep hits. See `compilation-error-regexp-alist'.") |
"Regexp used to match grep hits. See `compilation-error-regexp-alist'.") |
263 |
|
|
285 |
("^Grep \\(exited abnormally\\) with code \\([0-9]+\\).*" |
("^Grep \\(exited abnormally\\) with code \\([0-9]+\\).*" |
286 |
(0 '(face nil message nil help-echo nil mouse-face nil) t) |
(0 '(face nil message nil help-echo nil mouse-face nil) t) |
287 |
(1 compilation-warning-face) |
(1 compilation-warning-face) |
288 |
(2 compilation-line-face))) |
(2 compilation-line-face)) |
289 |
|
;; Highlight grep matches and delete markers |
290 |
|
("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)" |
291 |
|
(2 compilation-column-face) |
292 |
|
((lambda (p)) |
293 |
|
(progn |
294 |
|
;; Delete markers with `replace-match' because it updates |
295 |
|
;; the match-data, whereas `delete-region' would render it obsolete. |
296 |
|
(replace-match "" t t nil 3) |
297 |
|
(replace-match "" t t nil 1))))) |
298 |
"Additional things to highlight in grep output. |
"Additional things to highlight in grep output. |
299 |
This gets tacked on the end of the generated expressions.") |
This gets tacked on the end of the generated expressions.") |
300 |
|
|