]> git.eshelyaron.com Git - emacs.git/commitdiff
Flymake's flymake-proc.el parses column numbers from gcc/javac errors
authorJoão Távora <joaotavora@gmail.com>
Tue, 19 Sep 2017 13:25:34 +0000 (14:25 +0100)
committerJoão Távora <joaotavora@gmail.com>
Tue, 3 Oct 2017 12:52:24 +0000 (13:52 +0100)
Column numbers are not a great way of marking diagnostic regions, but
that's probably all that can be expected from the flymake-proc.el
backend.  For now, try (end-of-thing 'sexp) to discover the
diagnostic's end position.

* lisp/progmodes/flymake-proc.el ()
(flymake-proc-err-line-patterns): Also parse column numbers,
if available, for gcc/javac warnings.

lisp/progmodes/flymake-proc.el

index abda259e898566176d888cea2da4b542cce39e37..dd6bf501733237e91dc7fdd98e521c3c63bd1e5c 100644 (file)
@@ -558,8 +558,8 @@ Convert it to flymake internal format."
      ("\\(?:Parse\\|Fatal\\) error: \\(.*\\) in \\(.*\\) on line \\([0-9]+\\)" 2 3 nil 1)
      ;; LaTeX warnings (fileless) ("\\(LaTeX \\(Warning\\|Error\\): .*\\) on input line \\([0-9]+\\)" 20 3 nil 1)
      ;; ant/javac.  Note this also matches gcc warnings!
-     (" *\\(\\[javac\\] *\\)?\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\):\\([0-9]+\\)\\(?::[0-9]+\\)?:[ \t\n]*\\(.+\\)"
-      2 4 nil 5))
+     (" *\\(\\[javac\\] *\\)?\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\):\\([0-9]+\\)\\(?::\\([0-9]+\\)\\)?:[ \t\n]*\\(.+\\)"
+      2 4 5 6))
    ;; compilation-error-regexp-alist)
    (flymake-proc-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist))
   "Patterns for matching error/warning lines.  Each pattern has the form