From: João Távora Date: Wed, 20 Sep 2023 21:30:25 +0000 (+0100) Subject: Flymake: Fix bug in flymake-diagnostics X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e0ce4409b22b822560dd162c9145f5310568fcf9;p=emacs.git Flymake: Fix bug in flymake-diagnostics * lisp/progmodes/flymake.el (flymake-diagnostics): Fix bug. --- 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)