emacs-diffs
[Top][All Lists]
Advanced

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

master b04f322: Also sort the totals section by size


From: Lars Ingebrigtsen
Subject: master b04f322: Also sort the totals section by size
Date: Fri, 11 Dec 2020 12:58:49 -0500 (EST)

branch: master
commit b04f322a9bd0e5376eca0d4c2961a8a076eeb9bb
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Also sort the totals section by size
    
    * lisp/emacs-lisp/memory-report.el (memory-report): Sort the
    totals by size, too.
---
 lisp/emacs-lisp/memory-report.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/memory-report.el b/lisp/emacs-lisp/memory-report.el
index 0184c7e..c88d9f2 100644
--- a/lisp/emacs-lisp/memory-report.el
+++ b/lisp/emacs-lisp/memory-report.el
@@ -59,7 +59,9 @@ by counted more than once."
       (if (listp report)
           (push report summaries)
         (push report details)))
-    (dolist (summary (nreverse summaries))
+    (dolist (summary (seq-sort (lambda (e1 e2)
+                                 (> (cdr e1) (cdr e2)))
+                               summaries))
       (insert (format "%s  %s\n"
                       (memory-report--format (cdr summary))
                       (car summary))))



reply via email to

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