]> code.delx.au - gnu-emacs/commitdiff
(sort-reorder-buffer): Don't assume point-min == 1.
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 12 Apr 2002 03:42:56 +0000 (03:42 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 12 Apr 2002 03:42:56 +0000 (03:42 +0000)
lisp/sort.el

index bedc76556f66e79a979b597b227029d3f6d923d9..ebcea995ad327bf2fbe8eee6650ff386c8b374b5 100644 (file)
@@ -186,9 +186,7 @@ same as ENDRECFUN."
              sort-lists (cdr sort-lists)
              old (cdr old)))
       (goto-char (point-max))
-      (insert-buffer-substring old-buffer
-                              last
-                              max)
+      (insert-buffer-substring old-buffer last max)
 
       ;; Copy the reordered text from the temporary buffer
       ;; to the buffer we sorted (OLD-BUFFER).
@@ -203,7 +201,7 @@ same as ENDRECFUN."
        (delete-region min max)
        ;; Now replace the separator " " with the sorted text.
        (goto-char (point-max))
-       (insert-buffer-substring temp-buffer 1 (1+ (- max min)))
+       (insert-buffer-substring temp-buffer)
        (delete-region min (1+ min))))))
 
 ;;;###autoload