]> git.eshelyaron.com Git - emacs.git/commit
Flymake: improve idempotence of flymake-mode (bug#69809)
authorJoão Távora <joaotavora@gmail.com>
Tue, 14 Jan 2025 17:44:38 +0000 (17:44 +0000)
committerEshel Yaron <me@eshelyaron.com>
Tue, 14 Jan 2025 18:10:38 +0000 (19:10 +0100)
commit507844e680f91db81676bfc218dd4737f7b798d3
treea10e3abc05b9552fc9dbb4cd320a20f1abb89d16
parentff27eb5e04677fd00f35277e471e0a7ab1e554b9
Flymake: improve idempotence of flymake-mode (bug#69809)

In some circumstances, such as the ones described in the referenced bug
report, flymake-mode is activated non-interactively and asynchronously
in buffers where it may already be active and in the midst of
operations.

This commit ensures that flymake-mode a bit safer to re-enable in such
circumstances and fixes the bug.  It also adds some comments documenting
the situation.

* lisp/progmodes/flymake.el (flymake-mode): Don't smash flymake--state.
Add some comments.  No need to check for flymake--state nil.
(flymake--project-diagnostics): No need to check for flymake--state nil.

(cherry picked from commit 3a1b36a39dcd5a860a91a403f96721109203934a)
lisp/progmodes/flymake.el