summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-01-19 01:59:51 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2013-01-19 01:59:51 -0800
commitb3fbb3956cda29770670ac02d04804cee0c74f86 (patch)
treee9031a92a7f186ee6c7db5bdab9864697d9e25e1 /doc
parent73c1421878b3ce4ac6fdb2b0133fda7522578a29 (diff)
downloademacs-b3fbb3956cda29770670ac02d04804cee0c74f86.tar.gz
Allow floating-point file offsets.
Problem reported by Vitalie Spinu in <http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00411.html>. * doc/lispref/files.texi (Reading from Files, Writing to Files): Say that file offsets can be numbers, not just integers. * src/fileio.c (emacs_lseek): Remove. (file_offset): New function. (Finsert_file_contents, Fwrite_region): Use it.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/ChangeLog6
-rw-r--r--doc/lispref/files.texi10
2 files changed, 11 insertions, 5 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 2631bdf708a..851f727621e 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,9 @@
+2013-01-19 Paul Eggert <eggert@cs.ucla.edu>
+
+ Allow floating-point file offsets.
+ * files.texi (Reading from Files, Writing to Files):
+ Say that file offsets can be numbers, not just integers.
+
2013-01-09 Glenn Morris <rgm@gnu.org>
* commands.texi (Interactive Codes):
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 114eb1f38ea..be44590f2ec 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -533,9 +533,9 @@ is visiting the file @var{filename}: these include the buffer's visited
file name and its last save file modtime. This feature is used by
@code{find-file-noselect} and you probably should not use it yourself.
-If @var{beg} and @var{end} are non-@code{nil}, they should be integers
-specifying the portion of the file to insert. In this case, @var{visit}
-must be @code{nil}. For example,
+If @var{beg} and @var{end} are non-@code{nil}, they should be numbers
+that are byte offsets specifying the portion of the file to insert.
+In this case, @var{visit} must be @code{nil}. For example,
@example
(insert-file-contents filename nil 0 500)
@@ -605,8 +605,8 @@ that string, rather than text from the buffer. @var{end} is ignored in
this case.
If @var{append} is non-@code{nil}, then the specified text is appended
-to the existing file contents (if any). If @var{append} is an
-integer, @code{write-region} seeks to that byte offset from the start
+to the existing file contents (if any). If @var{append} is a
+number, @code{write-region} seeks to that byte offset from the start
of the file and writes the data from there.
If @var{mustbenew} is non-@code{nil}, then @code{write-region} asks