aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2002-04-12 03:42:56 +0000
committerStefan Monnier2002-04-12 03:42:56 +0000
commitce4ef58746e11835293cee8b4447e8919c60ce84 (patch)
tree65fb320ecba8e36c5aab440afa8b055d5a1c8ab3
parentc6005bf36e701b8abd23ed58f8c9eb53ef2fad83 (diff)
downloademacs-ce4ef58746e11835293cee8b4447e8919c60ce84.tar.gz
emacs-ce4ef58746e11835293cee8b4447e8919c60ce84.zip
(sort-reorder-buffer): Don't assume point-min == 1.
-rw-r--r--lisp/sort.el6
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/sort.el b/lisp/sort.el
index bedc76556f6..ebcea995ad3 100644
--- a/lisp/sort.el
+++ b/lisp/sort.el
@@ -186,9 +186,7 @@ same as ENDRECFUN."
186 sort-lists (cdr sort-lists) 186 sort-lists (cdr sort-lists)
187 old (cdr old))) 187 old (cdr old)))
188 (goto-char (point-max)) 188 (goto-char (point-max))
189 (insert-buffer-substring old-buffer 189 (insert-buffer-substring old-buffer last max)
190 last
191 max)
192 190
193 ;; Copy the reordered text from the temporary buffer 191 ;; Copy the reordered text from the temporary buffer
194 ;; to the buffer we sorted (OLD-BUFFER). 192 ;; to the buffer we sorted (OLD-BUFFER).
@@ -203,7 +201,7 @@ same as ENDRECFUN."
203 (delete-region min max) 201 (delete-region min max)
204 ;; Now replace the separator " " with the sorted text. 202 ;; Now replace the separator " " with the sorted text.
205 (goto-char (point-max)) 203 (goto-char (point-max))
206 (insert-buffer-substring temp-buffer 1 (1+ (- max min))) 204 (insert-buffer-substring temp-buffer)
207 (delete-region min (1+ min)))))) 205 (delete-region min (1+ min))))))
208 206
209;;;###autoload 207;;;###autoload