* lisp/emacs-lisp/tabulated-list.el: Don't sort without sorter

(tabulated-list-print): Don't sort if sorter is nil
This commit is contained in:
Artur Malabarba 2015-05-26 09:32:45 +01:00
parent f43306aed9
commit 45c92ddd99

View file

@ -327,7 +327,8 @@ changing `tabulated-list-sort-key'."
(setq entry-id (tabulated-list-get-id))
(setq saved-col (current-column)))
;; Sort the entries, if necessary.
(setq entries (sort entries sorter))
(when sorter
(setq entries (sort entries sorter)))
(unless (functionp tabulated-list-entries)
(setq tabulated-list-entries entries))
;; Without a sorter, we have no way to just update.