summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJoão Távora <joaotavora@gmail.com>2017-11-09 20:33:02 +0000
committerJoão Távora <joaotavora@gmail.com>2017-11-09 20:36:36 +0000
commitb28de574112991bfd2234989d080e54f565a549c (patch)
tree3057317e4cdcf721d88f5bccde20f4d588f20ee5 /lisp
parentfc56bea1420266ea6495a2e74df28349458b6fb0 (diff)
downloademacs-b28de574112991bfd2234989d080e54f565a549c.tar.gz
Sort entries of the Flymake diagnostics buffer (bug#29175)
Reported by Lele Gaifax <lele@metapensiero.it>. * lisp/progmodes/flymake.el (flymake--diagnostics-buffer-entries): Sort results of flymake-diagnostics.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/flymake.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index e833cd949ee..921ac913309 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -1137,7 +1137,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))