diff options
| author | Richard M. Stallman | 1996-12-10 07:26:02 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-12-10 07:26:02 +0000 |
| commit | c08fe8fdc55065906c4aea8ce8e521c5809aeaff (patch) | |
| tree | 96800489a3b0a862d7c5932d80d4b686230fe2b3 | |
| parent | 59b1de826d4fde74e91d073c7a22ccfe7b1668bb (diff) | |
| download | emacs-c08fe8fdc55065906c4aea8ce8e521c5809aeaff.tar.gz emacs-c08fe8fdc55065906c4aea8ce8e521c5809aeaff.zip | |
(sort-columns): Don't use `sort' utility if the text has text properties.
| -rw-r--r-- | lisp/sort.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/sort.el b/lisp/sort.el index d4131e7825b..61a35b635c6 100644 --- a/lisp/sort.el +++ b/lisp/sort.el | |||
| @@ -455,8 +455,12 @@ Use \\[untabify] to convert tabs to spaces before sorting." | |||
| 455 | (setq col-end (max col-beg1 col-end1)) | 455 | (setq col-end (max col-beg1 col-end1)) |
| 456 | (if (search-backward "\t" beg1 t) | 456 | (if (search-backward "\t" beg1 t) |
| 457 | (error "sort-columns does not work with tabs. Use M-x untabify.")) | 457 | (error "sort-columns does not work with tabs. Use M-x untabify.")) |
| 458 | (if (not (eq system-type 'vax-vms)) | 458 | (if (not (or (eq system-type 'vax-vms) |
| 459 | (text-properties-at beg1) | ||
| 460 | (< (next-property-change beg1 nil end1) end1))) | ||
| 459 | ;; Use the sort utility if we can; it is 4 times as fast. | 461 | ;; Use the sort utility if we can; it is 4 times as fast. |
| 462 | ;; Do not use it if there are any properties in the region, | ||
| 463 | ;; since the sort utility would lose the properties. | ||
| 460 | (call-process-region beg1 end1 "sort" t t nil | 464 | (call-process-region beg1 end1 "sort" t t nil |
| 461 | (if reverse "-rt\n" "-t\n") | 465 | (if reverse "-rt\n" "-t\n") |
| 462 | (concat "+0." col-start) | 466 | (concat "+0." col-start) |