mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Signal a better error in tabulated-list-sort
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-sort): Signal error earlier on invalid column numbers (bug#52154).
This commit is contained in:
parent
e3351f6152
commit
4de13ef147
1 changed files with 4 additions and 0 deletions
|
|
@ -684,6 +684,10 @@ With a numeric prefix argument N, sort the Nth column.
|
|||
If the numeric prefix is -1, restore order the list was
|
||||
originally displayed in."
|
||||
(interactive "P")
|
||||
(when (and n
|
||||
(or (>= n (length tabulated-list-format))
|
||||
(< n -1)))
|
||||
(user-error "Invalid column number"))
|
||||
(if (equal n -1)
|
||||
;; Restore original order.
|
||||
(progn
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue