aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert2013-01-19 01:59:51 -0800
committerPaul Eggert2013-01-19 01:59:51 -0800
commitb3fbb3956cda29770670ac02d04804cee0c74f86 (patch)
treee9031a92a7f186ee6c7db5bdab9864697d9e25e1 /doc
parent73c1421878b3ce4ac6fdb2b0133fda7522578a29 (diff)
downloademacs-b3fbb3956cda29770670ac02d04804cee0c74f86.tar.gz
emacs-b3fbb3956cda29770670ac02d04804cee0c74f86.zip
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 @@
12013-01-19 Paul Eggert <eggert@cs.ucla.edu>
2
3 Allow floating-point file offsets.
4 * files.texi (Reading from Files, Writing to Files):
5 Say that file offsets can be numbers, not just integers.
6
12013-01-09 Glenn Morris <rgm@gnu.org> 72013-01-09 Glenn Morris <rgm@gnu.org>
2 8
3 * commands.texi (Interactive Codes): 9 * 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
533file name and its last save file modtime. This feature is used by 533file name and its last save file modtime. This feature is used by
534@code{find-file-noselect} and you probably should not use it yourself. 534@code{find-file-noselect} and you probably should not use it yourself.
535 535
536If @var{beg} and @var{end} are non-@code{nil}, they should be integers 536If @var{beg} and @var{end} are non-@code{nil}, they should be numbers
537specifying the portion of the file to insert. In this case, @var{visit} 537that are byte offsets specifying the portion of the file to insert.
538must be @code{nil}. For example, 538In this case, @var{visit} must be @code{nil}. For example,
539 539
540@example 540@example
541(insert-file-contents filename nil 0 500) 541(insert-file-contents filename nil 0 500)
@@ -605,8 +605,8 @@ that string, rather than text from the buffer. @var{end} is ignored in
605this case. 605this case.
606 606
607If @var{append} is non-@code{nil}, then the specified text is appended 607If @var{append} is non-@code{nil}, then the specified text is appended
608to the existing file contents (if any). If @var{append} is an 608to the existing file contents (if any). If @var{append} is a
609integer, @code{write-region} seeks to that byte offset from the start 609number, @code{write-region} seeks to that byte offset from the start
610of the file and writes the data from there. 610of the file and writes the data from there.
611 611
612If @var{mustbenew} is non-@code{nil}, then @code{write-region} asks 612If @var{mustbenew} is non-@code{nil}, then @code{write-region} asks