]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-insert-file): Don't assume byte==char.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 6 Nov 2000 13:21:09 +0000 (13:21 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 6 Nov 2000 13:21:09 +0000 (13:21 +0000)
lisp/ChangeLog
lisp/vc-hooks.el

index 486210e4194327a9ee961f6fe53afe79b592aa57..db1d13ffb31b3f5ab5ba902304e77a2ebd582ec7 100644 (file)
@@ -20,6 +20,8 @@
 
 2000-11-06  Stefan Monnier  <monnier@cs.yale.edu>
 
+       * vc-hooks.el (vc-insert-file): Don't assume byte==char.
+
        * pcvs.el (cvs-mode-marked): New arg `noquery'.
        Prompt user for a file rather than raising an error.
        (cvs-enabledp): Fix call to cvs-mode-marked.
@@ -37,8 +39,8 @@
        (cvs-status-get-tags): Fix regexp.
        (cvs-status-trees, cvs-status-cvstrees):
        Combine after change hooks and don't sit-for.
-       (cvs-tree-use-jisx0208): Renamed from cvs-tree-dstr-2byte-ready.
-       (cvs-tree-char-*): Renamed from cvs-tree-dstr-char-*.
+       (cvs-tree-use-jisx0208): Rename from cvs-tree-dstr-2byte-ready.
+       (cvs-tree-char-*): Rename from cvs-tree-dstr-char-*.
        Use make-char rather than hard-coded cryptic data.
        (cvs-status-cvstrees): Convert the buffer to multibyte if necessary.
 
index 7af6c735c9765d9067cf762c473512066ac720f2..a91f76740d3a732b347750b2b23fa39c0580972b 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.127 2000/11/04 18:24:50 spiegel 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))