]> git.eshelyaron.com Git - emacs.git/commitdiff
Flymake: Fix bug in flymake-diagnostics
authorJoão Távora <joaotavora@gmail.com>
Wed, 20 Sep 2023 21:30:25 +0000 (22:30 +0100)
committerJoão Távora <joaotavora@gmail.com>
Wed, 20 Sep 2023 21:49:17 +0000 (22:49 +0100)
* lisp/progmodes/flymake.el (flymake-diagnostics): Fix bug.

lisp/progmodes/flymake.el

index 269440fd8e185e3c92d7ae4c8b9bba8de3f31b39..1f55df47a46f50a59a1057f0d16fa0cac8627247 100644 (file)
@@ -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)