]> git.eshelyaron.com Git - emacs.git/commit
Simplify Flymake logging and erroring
authorJoão Távora <joaotavora@gmail.com>
Tue, 26 Sep 2017 00:35:43 +0000 (01:35 +0100)
committerJoão Távora <joaotavora@gmail.com>
Mon, 2 Oct 2017 23:59:25 +0000 (00:59 +0100)
commitfc30b6b1e0970d6951f626de47b7eed1dd537c76
treef91c85c7d5871058a20e5f74cb6b0f5fe4afe1f6
parentb4099cb7eab1518daf97740380b2d2634a1a3e6f
Simplify Flymake logging and erroring

Use display-warning and a dedicated *Flymake log* buffer.

To ease readability, flymake log messages are now prefixed with a
common prefix and the buffer that originated them.

Some situations of over-zealous logging are fixed.

Use byte-compiler info, if available, to determine whence the
flymake-related log message is coming.

* lisp/progmodes/flymake-proc.el
(flymake-proc--diagnostics-for-pattern): Improve log message.
(flymake-proc--panic): Always flymake-log an error
(flymake-proc--safe-delete-file)
(flymake-proc--safe-delete-directory):
Downgrade warning
(flymake-proc-start-syntax-check): Simplify slightly.
(flymake-proc--start-syntax-check-process): Simplify.
(flymake-proc--init-find-buildfile-dir)
(flymake-proc--init-create-temp-source-and-master-buffer-copy):
No need to warn twice.

* lisp/progmodes/flymake.el (flymake-log): Convert to macro.
(flymake--log-1): New helper.
(flymake-log-level): Deprecate.
(flymake-error): New helper.
(flymake-ler-make-ler, flymake--handle-report, flymake-mode):
Use flymake-error.
(flymake-on-timer-event)
(flymake--handle-report, flymake--disable-backend)
(flymake--run-backend, flymake-start, flymake-mode-on)
(flymake-mode-off, flymake-after-change-function)
(flymake-after-save-hook, flymake-find-file-hook): Adjust
flymake-log calls.

* test/lisp/progmodes/flymake-tests.el
(flymake-tests--call-with-fixture): Only log errors.
lisp/progmodes/flymake-proc.el
lisp/progmodes/flymake.el
test/lisp/progmodes/flymake-tests.el