comparison lisp/sort.el @ 69079:68ba98572eb9

(sort-columns): Use Posix arg syntax for `sort'.
author Richard M. Stallman <rms@gnu.org>
date Tue, 21 Feb 2006 19:52:28 +0000
parents 3bd95f4f2941
children 709ebd36d96d d1c5430c5bff
comparison
equal deleted inserted replaced
69078:fba8c045e2a0 69079:68ba98572eb9
497 ;; Use the sort utility if we can; it is 4 times as fast. 497 ;; Use the sort utility if we can; it is 4 times as fast.
498 ;; Do not use it if there are any non-font-lock properties 498 ;; Do not use it if there are any non-font-lock properties
499 ;; in the region, since the sort utility would lose the 499 ;; in the region, since the sort utility would lose the
500 ;; properties. 500 ;; properties.
501 (let ((sort-args (list (if reverse "-rt\n" "-t\n") 501 (let ((sort-args (list (if reverse "-rt\n" "-t\n")
502 (concat "+0." (int-to-string col-start)) 502 (format "-k1.%d,1.%d"
503 (concat "-0." (int-to-string col-end))))) 503 (1+ col-start)
504 (1+ col-end)))))
504 (when sort-fold-case 505 (when sort-fold-case
505 (push "-f" sort-args)) 506 (push "-f" sort-args))
506 (apply #'call-process-region beg1 end1 "sort" t t nil sort-args)) 507 (apply #'call-process-region beg1 end1 "sort" t t nil sort-args))
507 ;; On VMS and ms-windows, use Emacs's own facilities. 508 ;; On VMS and ms-windows, use Emacs's own facilities.
508 (save-excursion 509 (save-excursion