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.
(cherry picked from commit
b436f430e3897e1aa6dcb5a39564a3553bbf631f)
(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)))))))