Mercurial > emacs
changeset 16655:c7b0fffd4c2e
(sort-columns): Don't use `sort' utility if the text has text properties.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 10 Dec 1996 07:26:02 +0000 |
parents | 4f8b4e26cc92 |
children | 9cbbf721b91c |
files | lisp/sort.el |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/sort.el Tue Dec 10 07:24:21 1996 +0000 +++ b/lisp/sort.el Tue Dec 10 07:26:02 1996 +0000 @@ -455,8 +455,12 @@ (setq col-end (max col-beg1 col-end1)) (if (search-backward "\t" beg1 t) (error "sort-columns does not work with tabs. Use M-x untabify.")) - (if (not (eq system-type 'vax-vms)) + (if (not (or (eq system-type 'vax-vms) + (text-properties-at beg1) + (< (next-property-change beg1 nil end1) end1))) ;; Use the sort utility if we can; it is 4 times as fast. + ;; Do not use it if there are any properties in the region, + ;; since the sort utility would lose the properties. (call-process-region beg1 end1 "sort" t t nil (if reverse "-rt\n" "-t\n") (concat "+0." col-start)