/[emacs]/emacs/lisp/vc-hooks.el
ViewVC logotype

Diff of /emacs/lisp/vc-hooks.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.140 by spiegel, Tue Jul 16 17:42:57 2002 UTC revision 1.141 by spiegel, Fri Jul 19 13:26:11 2002 UTC
# Line 216  It is usually called via the `vc-call' m Line 216  It is usually called via the `vc-call' m
216    
217  Optional argument LIMIT is a regexp.  If present, the file is inserted  Optional argument LIMIT is a regexp.  If present, the file is inserted
218  in chunks of size BLOCKSIZE (default 8 kByte), until the first  in chunks of size BLOCKSIZE (default 8 kByte), until the first
219  occurrence of LIMIT is found.  The function returns non-nil if FILE  occurrence of LIMIT is found.  Anything from the start of that occurence
220  exists and its contents were successfully inserted."  to the end of the buffer is then deleted.  The function returns
221    non-nil if FILE exists and its contents were successfully inserted."
222    (erase-buffer)    (erase-buffer)
223    (when (file-exists-p file)    (when (file-exists-p file)
224      (if (not limit)      (if (not limit)
# Line 228  exists and its contents were successfull Line 229  exists and its contents were successfull
229              (and (< 0 (cadr (insert-file-contents              (and (< 0 (cadr (insert-file-contents
230                               file nil filepos (incf filepos blocksize))))                               file nil filepos (incf filepos blocksize))))
231                   (progn (beginning-of-line)                   (progn (beginning-of-line)
232                          (not (re-search-forward limit nil 'move)))))))                          (let ((pos (re-search-forward limit nil 'move)))
233                              (if pos (delete-region (match-beginning 0)
234                                                     (point-max)))
235                              (not pos)))))))
236      (set-buffer-modified-p nil)      (set-buffer-modified-p nil)
237      t))      t))
238    

Legend:
Removed from v.1.140  
changed lines
  Added in v.1.141

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26