]> code.delx.au - gnu-emacs/blobdiff - lisp/vc-hooks.el
(auto-insert-alist): Add `provide' to elisp skeleton.
[gnu-emacs] / lisp / vc-hooks.el
index 7af6c735c9765d9067cf762c473512066ac720f2..9f7bab9c1d22e7ab71ab1268aa8f20093dc61eab 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author:     FSF (see vc.el for full credits)
 ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
 
-;; $Id: vc-hooks.el,v 1.126 2000/10/27 13:26:18 spiegel Exp $
+;; $Id: vc-hooks.el,v 1.128 2000/11/06 13:19:38 monnier Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -215,15 +215,12 @@ exists and its contents were successfully inserted."
     (if (not limit)
         (insert-file-contents file)
       (if (not blocksize) (setq blocksize 8192))
-      (let (found s)
-        (while (not found)
-          (setq s (buffer-size))
-          (goto-char (1+ s))
-          (setq found
-                (or (zerop (cadr (insert-file-contents
-                                  file nil s (+ s blocksize))))
-                    (progn (beginning-of-line)
-                           (re-search-forward limit nil t)))))))
+      (let ((filepos 0))
+        (while
+           (and (< 0 (cadr (insert-file-contents
+                            file nil filepos (incf filepos blocksize))))
+                (progn (beginning-of-line)
+                       (not (re-search-forward limit nil 'move)))))))
     (set-buffer-modified-p nil)
     t))