diff options
| author | Gerd Moellmann | 2001-09-26 15:30:07 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-09-26 15:30:07 +0000 |
| commit | b02439c895f5c4c9b0e02ea273bbddd3285e934b (patch) | |
| tree | c23e1a8ffb0d0641c390dac1a425265fe4f37365 /src | |
| parent | b08bd2df8f2921aa10d0487a0801c137f67bacc2 (diff) | |
| download | emacs-b02439c895f5c4c9b0e02ea273bbddd3285e934b.tar.gz emacs-b02439c895f5c4c9b0e02ea273bbddd3285e934b.zip | |
(Finsert_file_contents): If REPLACE is non-nil, stop
reading at EOF.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/fileio.c | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index bf9f1ee228c..0ed1353ff76 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2001-09-26 Gerd Moellmann <gerd@gnu.org> | 1 | 2001-09-26 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * fileio.c (Finsert_file_contents): If REPLACE is non-nil, stop | ||
| 4 | reading at EOF. | ||
| 5 | |||
| 3 | * xdisp.c (with_echo_area_buffer): Use echo_kboard instead | 6 | * xdisp.c (with_echo_area_buffer): Use echo_kboard instead |
| 4 | of the only temporarily set echoing flag for deciding when | 7 | of the only temporarily set echoing flag for deciding when |
| 5 | the cancel echoing. | 8 | the cancel echoing. |
diff --git a/src/fileio.c b/src/fileio.c index 20b7079700e..b152f0a74e0 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -3870,7 +3870,7 @@ actually used.") | |||
| 3870 | report_file_error ("Setting file position", | 3870 | report_file_error ("Setting file position", |
| 3871 | Fcons (orig_filename, Qnil)); | 3871 | Fcons (orig_filename, Qnil)); |
| 3872 | 3872 | ||
| 3873 | total_read = 0; | 3873 | total_read = nread = 0; |
| 3874 | while (total_read < trial) | 3874 | while (total_read < trial) |
| 3875 | { | 3875 | { |
| 3876 | nread = emacs_read (fd, buffer + total_read, trial - total_read); | 3876 | nread = emacs_read (fd, buffer + total_read, trial - total_read); |
| @@ -3905,6 +3905,9 @@ actually used.") | |||
| 3905 | giveup_match_end = 1; | 3905 | giveup_match_end = 1; |
| 3906 | break; | 3906 | break; |
| 3907 | } | 3907 | } |
| 3908 | |||
| 3909 | if (nread == 0) | ||
| 3910 | break; | ||
| 3908 | } | 3911 | } |
| 3909 | immediate_quit = 0; | 3912 | immediate_quit = 0; |
| 3910 | 3913 | ||