]> git.eshelyaron.com Git - emacs.git/commit
Flymake: more ambitious cleanup in flymake-mode (bug#69809)
authorJoão Távora <joaotavora@gmail.com>
Thu, 18 Jul 2024 00:09:10 +0000 (01:09 +0100)
committerEshel Yaron <me@eshelyaron.com>
Tue, 14 Jan 2025 18:13:17 +0000 (19:13 +0100)
commit01eaa23ac3982549f1107072981e460bfc962e1e
treec47f8893c241160cfd6ecb4376f1ef70e46ec08f
parent507844e680f91db81676bfc218dd4737f7b798d3
Flymake: more ambitious cleanup in flymake-mode (bug#69809)

Further improve flymake-mode idempotency by not nuke existing overlays.
This means multiple flymake-mode invocations do the same as just one
one, with minimal or no additional side effects.  This is good for
people with lots of 'flymake-mode' in hooks.

The foreign diagnostic importation has been refactored into a separate
function and moved to the "really start" section of 'flymake-start'.
The duplication problem appears to be avoided by some heuristics in
flymake-highlight-line.

A new test has been added.

* lisp/progmodes/flymake.el (flymake--import-foreign-diagnostics): New helper
  (flymake-start): Use it.
  (flymake-mode): Don't nuke overlays here.

* test/lisp/progmodes/flymake-tests.el (foreign-diagnostics): New
  test.

(cherry picked from commit 0ff82eb48725e15bb87a75d4f937b75c2482c59b)
lisp/progmodes/flymake.el
test/lisp/progmodes/flymake-tests.el