]> git.eshelyaron.com Git - emacs.git/commit
More Flymake cleanup before advancing to backend redesign
authorJoão Távora <joaotavora@gmail.com>
Sat, 23 Sep 2017 17:15:40 +0000 (18:15 +0100)
committerJoão Távora <joaotavora@gmail.com>
Mon, 2 Oct 2017 23:59:25 +0000 (00:59 +0100)
commitde4e13ac088a29b38fc94e9ca3aed6f24f6b12aa
tree2e7b475c2943318ed573cc4d399abf497d38c822
parent0a4e420a66ad3e40d2c6df995ca9189e137f9590
More Flymake cleanup before advancing to backend redesign

Diagnostics are reported for buffers, not necessarily files.  It’s the
backend’s responsibility to compute the buffer where the diagnostic is
applicable.  For now, this has to match the buffer where flymake-mode
is active and which is at the origin of the backend call.

flymake.el knows nothing about line/column diagnostics (except for
backward-compatible flymake-ler-make-ler, which must yet be tested).
It’s also the backend’s reponsibility to compute a BEG and END
positions for the diagnostic in the relevant buffer.

* lisp/progmodes/flymake-proc.el
(flymake-proc--diagnostics-for-pattern): Convert LINE/COL to
region here.  Check file buffer here.
(flymake-proc--process-sentinel): Don’t kill output buffer if
high enough log level.

* lisp/progmodes/flymake.el (flymake-diag-region): Make this a utility
function.  (flymake--highlight-line): Diagnostic has region now.
(flymake-popup-current-error-menu): Don’t add file and line numbers to
already this silly menu.  (flymake--fix-line-numbers): Remove.
(flymake-report): No need to fix diagnostics here.
lisp/progmodes/flymake-proc.el
lisp/progmodes/flymake.el