Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
c08fe8fd
Commit
c08fe8fd
authored
Dec 10, 1996
by
Richard M. Stallman
Browse files
(sort-columns): Don't use `sort' utility if the text has text properties.
parent
59b1de82
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
lisp/sort.el
lisp/sort.el
+5
-1
No files found.
lisp/sort.el
View file @
c08fe8fd
...
@@ -455,8 +455,12 @@ Use \\[untabify] to convert tabs to spaces before sorting."
...
@@ -455,8 +455,12 @@ Use \\[untabify] to convert tabs to spaces before sorting."
(
setq
col-end
(
max
col-beg1
col-end1
))
(
setq
col-end
(
max
col-beg1
col-end1
))
(
if
(
search-backward
"\t"
beg1
t
)
(
if
(
search-backward
"\t"
beg1
t
)
(
error
"sort-columns does not work with tabs. Use M-x untabify."
))
(
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.
;; 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
(
call-process-region
beg1
end1
"sort"
t
t
nil
(
if
reverse
"-rt\n"
"-t\n"
)
(
if
reverse
"-rt\n"
"-t\n"
)
(
concat
"+0."
col-start
)
(
concat
"+0."
col-start
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment