1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
emacs/lisp/progmodes
João Távora f6e909b41e Flymake backends can report multiple times per check
Rewrote a significant part of the Flymake backend API.  Flymake now
ignores the return value of backend functions: a function can either
returns or errors.  If it doesn't error, a backend is no longer
constrained to call REPORT-FN exactly once.  It may do so any number
of times, cumulatively reporting diagnostics.  Flymake keeps track of
outdated REPORT-FN instances and disconsiders obsolete reports.
Backends should avoid reporting obsolete data by cancelling any
ongoing processing at every renewed call to the backend function.

Consolidated flymake.el internal data structures to require less
buffer-local variables.  Adjusted Flymake's mode-line indicator to the
new semantics.

Adapted and simplified the implementation of elisp and legacy
backends, fixing potential race conditions when calling backends in
rapid succession.

Added a new test for a backend that calls REPORT-FN multiple
times.  Simplify test infrastructure.

* lisp/progmodes/flymake-elisp.el (flymake-elisp-checkdoc)
(flymake-elisp-byte-compile): Error instead of returning nil
if not in emacs-lisp-mode.
(flymake-elisp--byte-compile-process): New buffer-local variable.
(flymake-elisp-byte-compile): Mark (and kill) previous process
obsolete process before starting a new one.  Don't report if
obsolete process.

* lisp/progmodes/flymake-proc.el
(flymake-proc--current-process): New buffer-local variable.
(flymake-proc--processes): Remove.
(flymake-proc--process-filter): Don't bind
flymake-proc--report-fn.
(flymake-proc--process-sentinel): Rewrite.  Don't report if
obsolete process.
(flymake-proc-legacy-flymake): Rewrite.  Mark (and kill)
previous process obsolete process before starting a new
one.  Integrate flymake-proc--start-syntax-check-process
helper.
(flymake-proc--start-syntax-check-process): Delete.
(flymake-proc-stop-all-syntax-checks): Don't use
flymake-proc--processes, iterate buffers.
(flymake-proc-compile):

* lisp/progmodes/flymake.el (subr-x): Require it
explicitly.
(flymake-diagnostic-functions): Reword docstring.
(flymake--running-backends, flymake--disabled-backends)
(flymake--diagnostics-table): Delete.
(flymake--backend-state): New buffer-local variable and new defstruct.
(flymake--with-backend-state, flymake--collect)
(flymake-running-backends, flymake-disabled-backends)
(flymake-reporting-backends): New helpers.
(flymake-is-running): Use flymake-running-backends.
(flymake--handle-report): Rewrite.
(flymake-make-report-fn): Ensure REPORT-FN runs in the correct
buffer or not at all.
(flymake--disable-backend, flymake--run-backend): Rewrite.
(flymake-start): Rewrite.
(flymake-mode): Set flymake--backend-state.
(flymake--mode-line-format): Rewrite.

* test/lisp/progmodes/flymake-tests.el
(flymake-tests--wait-for-backends): New helper.
(flymake-tests--call-with-fixture): Use it.
(included-c-header-files): Fix whitespace.
(flymake-tests--diagnose-words): New helper.
(dummy-backends): Rewrite for new semantics.  Use cl-letf.
(flymake-tests--assert-set): Use quote.
(recurrent-backend): New test.
2017-10-03 14:18:55 +01:00
..
ada-mode.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
ada-prj.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
ada-stmt.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
ada-xref.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
antlr-mode.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
asm-mode.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
autoconf.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
bat-mode.el Fix last change in bat-mode.el 2017-09-22 20:41:10 +03:00
bug-reference.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
cc-align.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
cc-awk.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
cc-bytecomp.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
cc-cmds.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
cc-defs.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
cc-engine.el Fix a CC Mode brace stack cache bug. 2017-10-02 14:42:13 +00:00
cc-fonts.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
cc-guess.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
cc-langs.el Cope better with C++ and Objective-C protection keywords in class declarations 2017-09-16 11:31:38 +00:00
cc-menus.el Prefer HTTPS to HTTP for gnu.org 2017-10-01 19:59:01 -07:00
cc-mode.el Cope better with C++ and Objective-C protection keywords in class declarations 2017-09-16 11:31:38 +00:00
cc-styles.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
cc-vars.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
cfengine.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
cmacexp.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
compile.el Prefer HTTPS to HTTP for gnu.org 2017-10-01 19:59:01 -07:00
cperl-mode.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
cpp.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
cwarn.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
dcl-mode.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
ebnf-abn.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
ebnf-bnf.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
ebnf-dtd.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
ebnf-ebx.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
ebnf-iso.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
ebnf-otz.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
ebnf-yac.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
ebnf2ps.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
ebrowse.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
elisp-mode.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
etags.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
executable.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
f90.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
flymake-elisp.el Flymake backends can report multiple times per check 2017-10-03 14:18:55 +01:00
flymake-proc.el Flymake backends can report multiple times per check 2017-10-03 14:18:55 +01:00
flymake.el Flymake backends can report multiple times per check 2017-10-03 14:18:55 +01:00
fortran.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
gdb-mi.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
glasses.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
grep.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
gud.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
hideif.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
hideshow.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
icon.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
idlw-complete-structtag.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
idlw-help.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
idlw-shell.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
idlw-toolbar.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
idlwave.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
inf-lisp.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
js.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
ld-script.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
m4-mode.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
make-mode.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
mantemp.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
meta-mode.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
mixal-mode.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
modula2.el
octave.el Prefer HTTPS to HTTP for gnu.org 2017-10-01 19:59:01 -07:00
opascal.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
pascal.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
perl-mode.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
prog-mode.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
project.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
prolog.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
ps-mode.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
python.el Give more helpful messages for python completion setup failures 2017-10-02 23:15:43 -04:00
ruby-mode.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
scheme.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
sh-script.el ; Spelling fixes 2017-09-29 16:41:50 -07:00
simula.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
sql.el Prefer HTTPS to HTTP for gnu.org 2017-10-01 19:59:01 -07:00
subword.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
tcl.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
vera-mode.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
verilog-mode.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
vhdl-mode.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
which-func.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
xref.el Reset default-directory inside *xref-grep* buffer 2017-09-26 01:47:23 +03:00
xscheme.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00