From: Stefan Monnier Date: Fri, 12 Apr 2002 03:42:56 +0000 (+0000) Subject: (sort-reorder-buffer): Don't assume point-min == 1. X-Git-Tag: ttn-vms-21-2-B4~15672 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ce4ef58746e11835293cee8b4447e8919c60ce84;p=emacs.git (sort-reorder-buffer): Don't assume point-min == 1. --- 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." 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