- (setq lst '(("m" "A-2-1")("m" "A-1-1")("m" "A-2-2")("m" "A-1-2")("m" "A-1-3")("m" "A-2-3")))
- (vl-sort
- lst
- '(lambda (x y)
- (or (> (atoi (cadr (string:to-list (cadr x)"-")))
- (atoi (cadr (string:to-list (cadr y)"-"))))
- (and (= (atoi (cadr (string:to-list (cadr x)"-")))
- (atoi (cadr (string:to-list (cadr y)"-"))))
- (< (atoi (caddr (string:to-list (cadr x)"-")))
- (atoi (caddr (string:to-list (cadr y)"-"))))))))
函数 string:to-list 源码在 http://atlisp.cn/function/string:to-list
|