emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master f0d2b92 1/3: Protect elisp-flymake-checkdoc against boundless dia


From: João Távora
Subject: master f0d2b92 1/3: Protect elisp-flymake-checkdoc against boundless diagnostics
Date: Thu, 31 Dec 2020 09:04:03 -0500 (EST)

branch: master
commit f0d2b92f8b7377678231bec502c0f05b26b3a58e
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    Protect elisp-flymake-checkdoc against boundless diagnostics
    
    These would be the kind of "This file needs a ;;Code section" and
    such.
    
    * lisp/progmodes/elisp-mode.el (elisp-flymake-checkdoc): Resist
    checkdoc diagnostics with no end position.
---
 lisp/progmodes/elisp-mode.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 0e51553..9fbfe03 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -1720,7 +1720,8 @@ Calls REPORT-FN directly."
                       collect
                       (flymake-make-diagnostic
                        (current-buffer)
-                       start end :note text)))
+                       (or start 1) (or end (1+ (or start 1)))
+                       :note text)))
     collected))
 
 (defun elisp-flymake--byte-compile-done (report-fn



reply via email to

[Prev in Thread] Current Thread [Next in Thread]