]> git.eshelyaron.com Git - emacs.git/commitdiff
Sort entries of the Flymake diagnostics buffer (bug#29175)
authorJoão Távora <joaotavora@gmail.com>
Thu, 9 Nov 2017 20:33:02 +0000 (20:33 +0000)
committerJoão Távora <joaotavora@gmail.com>
Thu, 9 Nov 2017 20:36:36 +0000 (20:36 +0000)
Reported by Lele Gaifax <lele@metapensiero.it>.

* lisp/progmodes/flymake.el
(flymake--diagnostics-buffer-entries): Sort results of flymake-diagnostics.

lisp/progmodes/flymake.el

index e833cd949eeb9f4287c93f501e881c394be5f2e7..921ac9133093898f4c82cacdba90974dbc7fb5e3 100644 (file)
@@ -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))