From e0ce4409b22b822560dd162c9145f5310568fcf9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Wed, 20 Sep 2023 22:30:25 +0100 Subject: [PATCH] Flymake: Fix bug in flymake-diagnostics * lisp/progmodes/flymake.el (flymake-diagnostics): Fix bug. --- lisp/progmodes/flymake.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 269440fd8e1..1f55df47a46 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -356,7 +356,10 @@ otherwise if BEG is non-nil and END is nil, consider only diagnostics at BEG." (save-restriction (widen) - (cl-loop for o in (overlays-in (or beg (point-min)) (or end (point-max))) + (cl-loop for o in + (cond (end (overlays-in beg end)) + (beg (overlays-at beg)) + (t (overlays-in (point-min) (point-max)))) when (overlay-get o 'flymake-diagnostic) collect it))) (defmacro flymake--diag-accessor (public internal thing) -- 2.39.2