mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-31 20:02:42 +00:00
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-sort):
Check if column can be sorted before trying. (Bug#21639)
This commit is contained in:
parent
9ed9b7dc95
commit
e60a1e2717
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user