flymake-diag-region really returns nil if region is invalid (bug#29174)

Reported by Lele Gaifax <lele@metapensiero.it>.

* lisp/progmodes/flymake.el (flymake-diag-region): Really
return nil if the region is invalid.
This commit is contained in:
João Távora 2017-11-09 21:25:36 +00:00
parent 535688a418
commit 89382780e1

View file

@ -343,7 +343,8 @@ region is invalid."
(let* ((beg (fallback-bol))
(end (fallback-eol beg)))
(cons beg end)))))))
(error (flymake-log :warning "Invalid region line=%s col=%s" line col))))
(error (flymake-log :warning "Invalid region line=%s col=%s")
nil)))
(defvar flymake-diagnostic-functions nil
"Special hook of Flymake backends that check a buffer.