diff options
| author | Paul Eggert | 2013-01-19 01:59:51 -0800 |
|---|---|---|
| committer | Paul Eggert | 2013-01-19 01:59:51 -0800 |
| commit | b3fbb3956cda29770670ac02d04804cee0c74f86 (patch) | |
| tree | e9031a92a7f186ee6c7db5bdab9864697d9e25e1 /doc | |
| parent | 73c1421878b3ce4ac6fdb2b0133fda7522578a29 (diff) | |
| download | emacs-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/ChangeLog | 6 | ||||
| -rw-r--r-- | doc/lispref/files.texi | 10 |
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 @@ | |||
| 1 | 2013-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 | |||
| 1 | 2013-01-09 Glenn Morris <rgm@gnu.org> | 7 | 2013-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 | |||
| 533 | file name and its last save file modtime. This feature is used by | 533 | file 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 | ||
| 536 | If @var{beg} and @var{end} are non-@code{nil}, they should be integers | 536 | If @var{beg} and @var{end} are non-@code{nil}, they should be numbers |
| 537 | specifying the portion of the file to insert. In this case, @var{visit} | 537 | that are byte offsets specifying the portion of the file to insert. |
| 538 | must be @code{nil}. For example, | 538 | In 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 | |||
| 605 | this case. | 605 | this case. |
| 606 | 606 | ||
| 607 | If @var{append} is non-@code{nil}, then the specified text is appended | 607 | If @var{append} is non-@code{nil}, then the specified text is appended |
| 608 | to the existing file contents (if any). If @var{append} is an | 608 | to the existing file contents (if any). If @var{append} is a |
| 609 | integer, @code{write-region} seeks to that byte offset from the start | 609 | number, @code{write-region} seeks to that byte offset from the start |
| 610 | of the file and writes the data from there. | 610 | of the file and writes the data from there. |
| 611 | 611 | ||
| 612 | If @var{mustbenew} is non-@code{nil}, then @code{write-region} asks | 612 | If @var{mustbenew} is non-@code{nil}, then @code{write-region} asks |