From: Glenn Morris <rgm@gnu.org>
To: Reuben Thomas <rrt@sc3d.org>
Cc: 8866@debbugs.gnu.org
Subject: bug#8866: 23.3.50; flymake-mode colors warnings as errors
Date: Wed, 15 Jun 2011 03:28:17 -0400 [thread overview]
Message-ID: <3lwrgny2ni.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <87fwnc1a26.fsf@sc3d.org>
Reuben Thomas wrote:
> In emacs -Q, I visit a C file, M-x flymake-mode, and introduce a
> warning-inducing problem. The background of the line goes pink, which is
> the error face, not the warning face.
Crystal ball says:
You are using gcc 4.5 or later. Your warnings look like:
go.c:4:4: warning: 'a' is used uninitialized in this function
rather than:
go.c:4: warning: 'a' is used uninitialized in this function
Ie, they include a column number.
Due to the silly way this works, patching the "ant/javac" regexp in
flymake.el may fix this:
*** lisp/progmodes/flymake.el 2011-01-02 23:50:46 +0000
--- lisp/progmodes/flymake.el 2011-06-15 07:28:54 +0000
***************
*** 918,925 ****
;; PHP
("\\(?: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
! (" *\\(\\[javac\\] *\\)?\\(\\([a-zA-Z]:\\)?[^:(\t\n]+\\)\:\\([0-9]+\\)\:[ \t\n]*\\(.+\\)"
2 4 nil 5))
;; compilation-error-regexp-alist)
(flymake-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist))
--- 918,925 ----
;; PHP
("\\(?: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))
;; compilation-error-regexp-alist)
(flymake-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist))
prev parent reply other threads:[~2011-06-15 7:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-14 19:34 bug#8866: 23.3.50; flymake-mode colors warnings as errors Reuben Thomas
2011-06-15 7:28 ` Glenn Morris [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3lwrgny2ni.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=8866@debbugs.gnu.org \
--cc=rrt@sc3d.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).