Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
ff40374a
Commit
ff40374a
authored
Nov 04, 2000
by
André Spiegel
Browse files
(vc-insert-file): Rewritten. Don't bother about auto-save-mode.
parent
ad88b950
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
20 deletions
+18
-20
lisp/vc-hooks.el
lisp/vc-hooks.el
+18
-20
No files found.
lisp/vc-hooks.el
View file @
ff40374a
...
...
@@ -5,7 +5,7 @@
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
;; $Id: vc-hooks.el,v 1.12
5
2000/10/27 1
2:11:55
spiegel Exp $
;; $Id: vc-hooks.el,v 1.12
6
2000/10/27 1
3:26:18
spiegel Exp $
;; This file is part of GNU Emacs.
...
...
@@ -208,26 +208,24 @@ It is usually called via the `vc-call' macro."
Optional argument LIMIT is a regexp. If present, the file is inserted
in chunks of size BLOCKSIZE (default 8 kByte), until the first
occurrence of LIMIT is found. The function returns nil if FILE
doesn't
exist."
occurrence of LIMIT is found. The function returns
non-
nil if FILE
exist
s and its contents were successfully inserted
."
(
erase-buffer
)
(
cond
((
file-exists-p
file
)
(
cond
(
limit
(
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
)))))))
(
t
(
insert-file-contents
file
)))
(
set-buffer-modified-p
nil
)
(
auto-save-mode
nil
)
t
)
(
t
nil
)))
(
when
(
file-exists-p
file
)
(
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
)))))))
(
set-buffer-modified-p
nil
)
t
))
;;; Access functions to file properties
;;; (Properties should be _set_ using vc-file-setprop, but
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment