[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21496: 25.0.50; guile-file compilation-error regexp is too wide
From: |
Stefan Monnier |
Subject: |
bug#21496: 25.0.50; guile-file compilation-error regexp is too wide |
Date: |
Wed, 16 Sep 2015 17:52:05 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> In csharp--at-vsemi-p:
[...]
> The problem is that all these headers are picked up by the guile-file
> compilation-error-regexp entry which is extremely wide:
> (guile-file "^In \\(.+\\):\n" 1)
I was thinking of the patch below, which does two things:
1- lower the importance of those "In blabla:" from "error" to "info".
2- limit the .* to be either something that ends in .scm, or something
that has a slash (or backslash for w32), or something without spaces.
But I see that "something without spaces" is not strict enough, so we
should drop it. Maybe "something that ends in .scm" is good enough?
Stefan
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index a6e9ed8..24b7e63 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -477,7 +477,11 @@ File = \\(.+\\), Line = \\([0-9]+\\)\\(?:, Column =
\\([0-9]+\\)\\)?"
;;
"^\\([^ \t\r\n(]+\\) (\\([0-9]+\\):\\([0-9]+\\)) "
1 2 3)
- (guile-file "^In \\(.+\\):\n" 1)
+ (guile-file
+ ;; Try to make sure it's a file name so as not to match unrelated
+ ;; text such as "In end of data" or "In top level form" (bug#21496).
+ "^In \\(.+\\.scm\\|.+[/\\].*\\|[^ \n\t]+\\):\n"
+ 1 nil nil 0)
(guile-line "^ *\\([0-9]+\\): *\\([0-9]+\\)" nil 1 2)
)
"Alist of values for `compilation-error-regexp-alist'.")