From: Chong Yidong <cyd@stupidchicken.com>
To: Pavel Kobyakov <pk_at_work@yahoo.com>
Cc: 416@emacsbugs.donarmstrong.com, Nikolaj Schumacher <n_schumacher@web.de>
Subject: bug#416: flymake highlights errors from wrong file
Date: Mon, 18 Aug 2008 15:21:39 -0400 [thread overview]
Message-ID: <874p5ijfi4.fsf@cyd.mit.edu> (raw)
Hi Pavel,
Could you review the patch sent by Nikolaj? Thanks.
Nikolaj Schumacher wrote:
> flymake will highlight errors in the current buffer, even if the error
> comes from a different file.
>
> This can be noted, for example, when using
>
> > check-syntax:
> > gcc -Wall -Wextra -fsyntax-only *.cpp
>
> instead of the more common
>
> > check-syntax:
> > gcc -Wall -Wextra -pedantic -fsyntax-only -S $(CHK_SOURCES)
>
> in the Makefile.
>
> It also happens when using ant, where it can't be avoided.
>
> The attached patch filters out these errors when parsing.
> Alternatively, they could be filtered out when highlighting.
--- lisp/progmodes/flymake.el 2008-06-02 23:30:29.000000000 +0200
+++ lisp/progmodes/flymake.el 2008-06-05 23:30:08.000000000 +0200
@@ -866,11 +867,10 @@
(flymake-ler-file line-err-info)))
(setq line-err-info (flymake-ler-set-full-file line-err-info real-file-name))
- (if (flymake-same-files real-file-name source-file-name)
- (setq line-err-info (flymake-ler-set-file line-err-info nil))
- (setq line-err-info (flymake-ler-set-file line-err-info (file-name-nondirectory real-file-name))))
+ (when (flymake-same-files real-file-name source-file-name)
+ (setq line-err-info (flymake-ler-set-file line-err-info nil))
+ (setq err-info-list (flymake-add-err-info err-info-list line-err-info))))
- (setq err-info-list (flymake-add-err-info err-info-list line-err-info)))
(flymake-log 3 "parsed '%s', %s line-err-info" (nth idx lines) (if line-err-info "got" "no"))
(setq idx (1+ idx)))
err-info-list))
next reply other threads:[~2008-08-18 19:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-18 19:21 Chong Yidong [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-06-15 16:27 bug#416: flymake highlights errors from wrong file Nikolaj Schumacher
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874p5ijfi4.fsf@cyd.mit.edu \
--to=cyd@stupidchicken.com \
--cc=416@emacsbugs.donarmstrong.com \
--cc=n_schumacher@web.de \
--cc=pk_at_work@yahoo.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.