[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master b436f430e38: Don't hide flymake diagnostics on empty first line (
From: |
Mattias Engdegård |
Subject: |
master b436f430e38: Don't hide flymake diagnostics on empty first line (bug#70310) |
Date: |
Thu, 11 Apr 2024 08:01:49 -0400 (EDT) |
branch: master
commit b436f430e3897e1aa6dcb5a39564a3553bbf631f
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Don't hide flymake diagnostics on empty first line (bug#70310)
A diagnostic first in the buffer, typically the lexical cookie warning,
got lost if that line was empty.
* lisp/progmodes/elisp-mode.el (elisp-flymake--byte-compile-done):
Make sure the location interval doesn't go beyond the buffer bounds.
---
lisp/progmodes/elisp-mode.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 9b4c3f994cd..3383841391d 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -2151,8 +2151,13 @@ Calls REPORT-FN directly."
(point-max)))
collect (flymake-make-diagnostic
(current-buffer)
- (if (= beg end) (1- beg) beg)
- end
+ (if (= beg end)
+ (max (1- beg) (point-min))
+ beg)
+ (if (= beg end)
+ (min (max beg (1+ (point-min)))
+ (point-max))
+ end)
level
string)))))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master b436f430e38: Don't hide flymake diagnostics on empty first line (bug#70310),
Mattias Engdegård <=