[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 67c3a3a 2/2: Avoid occasional confusion of Flymake
From: |
João Távora |
Subject: |
[Emacs-diffs] master 67c3a3a 2/2: Avoid occasional confusion of Flymake C/C++ backend |
Date: |
Mon, 25 Mar 2019 10:56:34 -0400 (EDT) |
branch: master
commit 67c3a3af1d9e2582193d5ea33b6c190e79ad56e6
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Avoid occasional confusion of Flymake C/C++ backend
The regexp would sometimes match non-errors and create a diagnostic
with nil severity, which would have consequences for the Flymake
engine (these should eventually be addressed, too).
* lisp/progmodes/flymake-cc.el (flymake-cc--make-diagnostics):
Tighten regexp.
---
lisp/progmodes/flymake-cc.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/flymake-cc.el b/lisp/progmodes/flymake-cc.el
index 1b449bd..248c95a 100644
--- a/lisp/progmodes/flymake-cc.el
+++ b/lisp/progmodes/flymake-cc.el
@@ -58,7 +58,9 @@ SOURCE."
(cl-loop
while
(search-forward-regexp
- "^\\(In file included from
\\)?<stdin>:\\([0-9]+\\)\\(?::\\([0-9]+\\)\\)?:\n?\\(.*\\): \\(.*\\)$"
+ (concat
+ "^\\(In file included from \\)?<stdin>:\\([0-9]+\\)\\(?::\\([0-9]+\\)\\)"
+ "?:[\n ]?\\(error\\|warning\\|note\\): \\(.*\\)$")
nil t)
for msg = (match-string 5)
for (beg . end) = (flymake-diag-region