diff options
| author | Stefan Monnier | 2000-11-29 13:14:06 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2000-11-29 13:14:06 +0000 |
| commit | 02ebb2ea6c00e3e454331b312559df3935e488ec (patch) | |
| tree | a843830522f23786c884ed6fab56347864bccb15 /lisp | |
| parent | 601bda2ec98fe1caae90ce48f7a609ed1f9a8fac (diff) | |
| download | emacs-02ebb2ea6c00e3e454331b312559df3935e488ec.tar.gz emacs-02ebb2ea6c00e3e454331b312559df3935e488ec.zip | |
(sort-columns): Don't concat strings with numbers.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/sort.el | 10 |
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. |
| 463 | For the purpose of this command, the region includes | 463 | For the purpose of this command, the region BEG...END includes |
| 464 | the entire line that point is in and the entire line the mark is in. | 464 | the entire line that point is in and the entire line the mark is in. |
| 465 | The column positions of point and mark bound the range of columns to sort on. | 465 | The column positions of point and mark bound the range of columns to sort on. |
| 466 | A prefix argument means sort into reverse order. | 466 | A prefix argument means sort into REVERSE order. |
| 467 | The variable `sort-fold-case' determines whether alphabetic case affects | 467 | The variable `sort-fold-case' determines whether alphabetic case affects |
| 468 | the sort order. | 468 | the 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)) |