vl-sort
(vl-sort list function)
The list sorted with the comparison function, which receives two elements and returns non-nil if the first one goes first.
(vl-sort '(3 1 2) '<) ; (1 2 3)
Differences with AutoCAD
The sort is stable and keeps repeated elements (AutoCAD may remove them).