From: Johan Claesson Date: Fri, 20 Sep 2019 22:06:58 +0000 (+0200) Subject: Make the reverse tabulated list sort stable X-Git-Tag: emacs-27.0.90~1525 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7c3ef77ccbc144a269b2a45ec855647290c8e0d0;p=emacs.git Make the reverse tabulated list sort stable * lisp/emacs-lisp/tabulated-list.el (tabulated-list--get-sorter): Make the reverse sorting stable (bug#37174). Copyright-paperwork-exempt: yes --- diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index 63ae1f8c072..f30e2c0ec8e 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -373,7 +373,7 @@ column. Negate the predicate that would be returned if (if (stringp b) b (car b))))))) ;; Reversed order. (if (cdr tabulated-list-sort-key) - (lambda (a b) (not (funcall sorter a b))) + (lambda (a b) (funcall sorter b a)) sorter)))) (defsubst tabulated-list--col-local-max-widths (col)