Mercurial > emacs
comparison lisp/sort.el @ 90314:d1c5430c5bff
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-21
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 97-112)
- Update from CVS
- Merge from erc--emacs--0
- Update from CVS: src/regex.c (extend_range_table_work_area): Fix typo.
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 37)
- Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 22 Feb 2006 06:54:10 +0000 |
parents | c5406394f567 68ba98572eb9 |
children | e3bacb89536a |
comparison
equal
deleted
inserted
replaced
90313:496f6d9b9d20 | 90314:d1c5430c5bff |
---|---|
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 |