aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorJuri Linkov <[email protected]>2005-08-09 21:37:34 +0000
committerJuri Linkov <[email protected]>2005-08-09 21:37:34 +0000
commit7462142dc4355d8334d387e149257ddd03b62121 (patch)
treee0c4e94a31842056fed606c5f57317e1c6a7e61a /lisp/progmodes
parent38dbf92be67e0e09ed0aaf8a1925b1f889a6897a (diff)
(grep-regexp-alist): Use `.+?' instead of `[^:\n]+'.
(grep-mode-font-lock-keywords): Use `.+?' instead of `[^\n-]+'. (grep-error-face): Set to `compilation-error' instead of `compilation-error-face' (which is redefined to `grep-hit-face' in grep buffers). (grep-mode-font-lock-keywords): Remove `-text' from face variable names. Use `grep-error-face' instead of `compilation-error-text-face'.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/grep.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 3af5aebfc6..303ce2f5a1 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -244,11 +244,11 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
;;;###autoload
(defvar grep-regexp-alist
- '(("^\\([^:\n]+\\)\\(:[ \t]*\\)\\([0-9]+\\)\\2"
+ '(("^\\(.+?\\)\\(:[ \t]*\\)\\([0-9]+\\)\\2"
1 3)
;; Rule to match column numbers is commented out since no known grep
;; produces them
- ;; ("^\\([^:\n]+\\)\\(:[ \t]*\\)\\([0-9]+\\)\\2\\(?:\\([0-9]+\\)\\(?:-\\([0-9]+\\)\\)?\\2\\)?"
+ ;; ("^\\(.+?\\)\\(:[ \t]*\\)\\([0-9]+\\)\\2\\(?:\\([0-9]+\\)\\(?:-\\([0-9]+\\)\\)?\\2\\)?"
;; 1 3 (4 . 5))
("^\\(\\(.+?\\):\\([0-9]+\\):\\).*?\
\\(\033\\[01;31m\\(?:\033\\[K\\)?\\)\\(.*?\\)\\(\033\\[[0-9]*m\\)"
@@ -272,7 +272,7 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
(defvar grep-hit-face compilation-info-face
"Face name to use for grep hits.")
-(defvar grep-error-face compilation-error-face
+(defvar grep-error-face 'compilation-error
"Face name to use for grep error messages.")
(defvar grep-match-face 'match
@@ -289,13 +289,13 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
;; remove match from grep-regexp-alist before fontifying
("^Grep finished \\(?:(\\(matches found\\))\\|with \\(no matches found\\)\\).*"
(0 '(face nil message nil help-echo nil mouse-face nil) t)
- (1 compilation-info-text-face nil t)
- (2 compilation-warning-text-face nil t))
+ (1 compilation-info-face nil t)
+ (2 compilation-warning-face nil t))
("^Grep \\(exited abnormally\\) with code \\([0-9]+\\).*"
(0 '(face nil message nil help-echo nil mouse-face nil) t)
- (1 compilation-error-text-face)
- (2 compilation-error-text-face))
- ("^[^\n-]+-[0-9]+-.*" (0 grep-context-face))
+ (1 grep-error-face)
+ (2 grep-error-face))
+ ("^.+?-[0-9]+-.*\n" (0 grep-context-face))
;; Highlight grep matches and delete markers
("\\(\033\\[01;31m\\)\\(.*?\\)\\(\033\\[[0-9]*m\\)"
;; Refontification does not work after the markers have been