Flymake: fix bug introduced recently
Must protect against flymake--state never having been a hash table at all, so that flymake-mode can be safely turned off even if it never turned on in the first place. Github-reference: https://github.com/joaotavora/eglot/discussions/1480 * lisp/progmodes/flymake.el (flymake-mode): Fix bug.
This commit is contained in:
parent
c9196cf64e
commit
f7ff5f1ba4
1 changed files with 4 additions and 3 deletions
|
@ -1451,9 +1451,10 @@ special *Flymake log* buffer." :group 'flymake :lighter
|
|||
(cancel-timer flymake-timer)
|
||||
(setq flymake-timer nil))
|
||||
(mapc #'flymake--delete-overlay (flymake--really-all-overlays))
|
||||
(maphash (lambda (_backend state)
|
||||
(flymake--clear-foreign-diags state))
|
||||
flymake--state)))
|
||||
(when flymake--state
|
||||
(maphash (lambda (_backend state)
|
||||
(flymake--clear-foreign-diags state))
|
||||
flymake--state))))
|
||||
;; turning Flymake on or off has consequences for listings
|
||||
(flymake--update-diagnostics-listings (current-buffer)))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue