[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master e60a1e2 1/2: * lisp/emacs-lisp/tabulated-list.el (t
From: |
Artur Malabarba |
Subject: |
[Emacs-diffs] master e60a1e2 1/2: * lisp/emacs-lisp/tabulated-list.el (tabulated-list-sort): |
Date: |
Wed, 07 Oct 2015 14:14:18 +0000 |
branch: master
commit e60a1e2717ded78f062719b2cd8c41f358cf0198
Author: Artur Malabarba <address@hidden>
Commit: Artur Malabarba <address@hidden>
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-sort):
Check if column can be sorted before trying. (Bug#21639)
---
lisp/emacs-lisp/tabulated-list.el | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/lisp/emacs-lisp/tabulated-list.el
b/lisp/emacs-lisp/tabulated-list.el
index 47ecd2b..4bd8a19 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -520,7 +520,9 @@ With a numeric prefix argument N, sort the Nth column."
(car (aref tabulated-list-format n))
(get-text-property (point)
'tabulated-list-column-name))))
- (tabulated-list--sort-by-column-name name)))
+ (if (nth 2 (assoc name (append tabulated-list-format nil)))
+ (tabulated-list--sort-by-column-name name)
+ (user-error "Cannot sort by %s" name))))
(defun tabulated-list--sort-by-column-name (name)
(when (and name (derived-mode-p 'tabulated-list-mode))