aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/sort.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/sort.el b/lisp/sort.el
index 174a8531786..5183bf65afa 100644
--- a/lisp/sort.el
+++ b/lisp/sort.el
@@ -499,8 +499,9 @@ Use \\[untabify] to convert tabs to spaces before sorting."
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))