diff options
| author | Mattias EngdegÄrd | 2024-04-11 13:55:39 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2024-04-11 13:55:39 +0200 |
| commit | b436f430e3897e1aa6dcb5a39564a3553bbf631f (patch) | |
| tree | 8200514dbdd85a4cdd54d3c5b441b9ae76675f09 | |
| parent | fba8f3a6f1a8a099d93e70400d477ca6fe96007b (diff) | |
| download | emacs-b436f430e3897e1aa6dcb5a39564a3553bbf631f.tar.gz emacs-b436f430e3897e1aa6dcb5a39564a3553bbf631f.zip | |
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.
| -rw-r--r-- | lisp/progmodes/elisp-mode.el | 9 |
1 files 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." | |||
| 2151 | (point-max))) | 2151 | (point-max))) |
| 2152 | collect (flymake-make-diagnostic | 2152 | collect (flymake-make-diagnostic |
| 2153 | (current-buffer) | 2153 | (current-buffer) |
| 2154 | (if (= beg end) (1- beg) beg) | 2154 | (if (= beg end) |
| 2155 | end | 2155 | (max (1- beg) (point-min)) |
| 2156 | beg) | ||
| 2157 | (if (= beg end) | ||
| 2158 | (min (max beg (1+ (point-min))) | ||
| 2159 | (point-max)) | ||
| 2160 | end) | ||
| 2156 | level | 2161 | level |
| 2157 | string))))))) | 2162 | string))))))) |
| 2158 | 2163 | ||