]> 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>
Tue, 3 Oct 2017 12:52:24 +0000 (13:52 +0100)
commitb2f8b8b47ad6fe1550a183c5e96896ff587cd5f0
tree2e25b6982afc5c8b1d7585a2116fd1c5f7df0df7
parentb0bb181f9359aff07b09b919b8af397ef39d6784
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