summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/tabulated-list.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/tabulated-list.el')
-rw-r--r--lisp/emacs-lisp/tabulated-list.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index 9119c3a5ade..cd61eb9ae56 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -356,10 +356,11 @@ changing `tabulated-list-sort-key'."
nil)
;; If this entry sorts after id (or it's the
;; end), then just insert id and move on.
- ((funcall sorter elt
- ;; FIXME: Might be faster if
- ;; don't construct this list.
- (list local-id (tabulated-list-get-entry)))
+ ((or (not local-id)
+ (funcall sorter elt
+ ;; FIXME: Might be faster if
+ ;; don't construct this list.
+ (list local-id (tabulated-list-get-entry))))
(apply tabulated-list-printer elt)
nil)
;; We find an entry that sorts before id,