aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/sort.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/sort.el b/lisp/sort.el
index 0c5d1d9bae0..57a3643c4da 100644
--- a/lisp/sort.el
+++ b/lisp/sort.el
@@ -460,10 +460,10 @@ sRegexp specifying key within record: \nr")
460;;;###autoload 460;;;###autoload
461(defun sort-columns (reverse &optional beg end) 461(defun sort-columns (reverse &optional beg end)
462 "Sort lines in region alphabetically by a certain range of columns. 462 "Sort lines in region alphabetically by a certain range of columns.
463For the purpose of this command, the region includes 463For the purpose of this command, the region BEG...END includes
464the entire line that point is in and the entire line the mark is in. 464the entire line that point is in and the entire line the mark is in.
465The column positions of point and mark bound the range of columns to sort on. 465The column positions of point and mark bound the range of columns to sort on.
466A prefix argument means sort into reverse order. 466A prefix argument means sort into REVERSE order.
467The variable `sort-fold-case' determines whether alphabetic case affects 467The variable `sort-fold-case' determines whether alphabetic case affects
468the sort order. 468the sort order.
469 469
@@ -486,7 +486,7 @@ Use \\[untabify] to convert tabs to spaces before sorting."
486 (setq col-start (min col-beg1 col-end1)) 486 (setq col-start (min col-beg1 col-end1))
487 (setq col-end (max col-beg1 col-end1)) 487 (setq col-end (max col-beg1 col-end1))
488 (if (search-backward "\t" beg1 t) 488 (if (search-backward "\t" beg1 t)
489 (error "sort-columns does not work with tabs. Use M-x untabify.")) 489 (error "sort-columns does not work with tabs. Use M-x untabify"))
490 (if (not (or (eq system-type 'vax-vms) 490 (if (not (or (eq system-type 'vax-vms)
491 (text-properties-at beg1) 491 (text-properties-at beg1)
492 (< (next-property-change beg1 nil end1) end1))) 492 (< (next-property-change beg1 nil end1) end1)))
@@ -494,8 +494,8 @@ Use \\[untabify] to convert tabs to spaces before sorting."
494 ;; Do not use it if there are any properties in the region, 494 ;; Do not use it if there are any properties in the region,
495 ;; since the sort utility would lose the properties. 495 ;; since the sort utility would lose the properties.
496 (let ((sort-args (list (if reverse "-rt\n" "-t\n") 496 (let ((sort-args (list (if reverse "-rt\n" "-t\n")
497 (concat "+0." col-start) 497 (concat "+0." (int-to-string col-start))
498 (concat "-0." col-end)))) 498 (concat "-0." (int-to-string col-end)))))
499 (when sort-fold-case 499 (when sort-fold-case
500 (push "-f" sort-args)) 500 (push "-f" sort-args))
501 (apply #'call-process-region beg1 end1 "sort" t t nil sort-args)) 501 (apply #'call-process-region beg1 end1 "sort" t t nil sort-args))