summaryrefslogtreecommitdiff
path: root/lisp/progmodes/flymake.el
diff options
context:
space:
mode:
authorNoam Postavsky <npostavs@gmail.com>2017-11-11 11:10:49 -0500
committerNoam Postavsky <npostavs@gmail.com>2017-11-11 11:12:00 -0500
commit1fa0766cfa17e37be77a1566dbc775ab4ce7ff2e (patch)
tree66f1607d41b0bc490f3202c327ecb3fcdc5746bf /lisp/progmodes/flymake.el
parent1ef6d2b0e679c035dd2a1f2f858865eeafc5bc28 (diff)
parent9533d76b0b5bfe2df1cccc55a92c2545b1de4e2b (diff)
downloademacs-1fa0766cfa17e37be77a1566dbc775ab4ce7ff2e.tar.gz
emacs-1fa0766cfa17e37be77a1566dbc775ab4ce7ff2e.tar.bz2
emacs-1fa0766cfa17e37be77a1566dbc775ab4ce7ff2e.zip
; Merge from emacs-26
9533d76b0b Keep Man sections in natural order (bug#28998) d63c9a96f5 * lisp/minibuffer.el: Install a workaround for bug#16274 7657a86709 Fix comparisons with tip_frame in GTK builds 603a0716a8 Improve the documentation of M-n for entering file names 72f813fb56 Fix desktop auto-save timer when linum-mode is used 44340b475f Fix "C-h k" in xterm-mouse-mode 05aa6d4a68 Fix off-by-1 bug in --enable-checking=stringbytes 096f638ddc Correct the indentation of C99's compound literals. c52a2aa8f3 Improve the doc string of 'dired-isearch-filter-filenames' e592b92482 * lisp/isearch.el (search-invisible): Doc fix. (Bug#29222) f3e69a80ab Fix display of line numbers in GTK builds e6f1fd4091 Fix previous change to flymake-diag-region (bug#29174) 89382780e1 flymake-diag-region really returns nil if region is invali... 535688a418 Flymake correctly highlights whole last line if eob (bug#2... 72e62d3fdb Protect Flymake checkdoc backend against checkdoc errors (... b28de57411 Sort entries of the Flymake diagnostics buffer (bug#29175) fc56bea142 Correctly indent C++14 brace lists which are a second argu... 9dde8be9cd Fix redisplay of overlay-arrows on GUI frames 0da08f2f8e Protect Flymake tests against older Ruby and Perl (bug#29187) 781f276cc1 Fix URL cookie expiration bug
Diffstat (limited to 'lisp/progmodes/flymake.el')
-rw-r--r--lisp/progmodes/flymake.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 0d200f01b34..1930f4fc832 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -334,7 +334,8 @@ region is invalid."
(end (or (and sexp-end
(not (= sexp-end beg))
sexp-end)
- (ignore-errors (goto-char (1+ beg)))))
+ (and (< (goto-char (1+ beg)) (point-max))
+ (point))))
(safe-end (or end
(fallback-eol beg))))
(cons (if end beg (fallback-bol))
@@ -342,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" line col)
+ nil)))
(defvar flymake-diagnostic-functions nil
"Special hook of Flymake backends that check a buffer.
@@ -1139,7 +1141,8 @@ POS can be a buffer position or a button"
(defun flymake--diagnostics-buffer-entries ()
(with-current-buffer flymake--diagnostics-buffer-source
- (cl-loop for diag in (flymake-diagnostics)
+ (cl-loop for diag in
+ (cl-sort (flymake-diagnostics) #'< :key #'flymake-diagnostic-beg)
for (line . col) =
(save-excursion
(goto-char (flymake--diag-beg diag))