2001-09-26 Gerd Moellmann <gerd@gnu.org>
+ * fileio.c (Finsert_file_contents): If REPLACE is non-nil, stop
+ reading at EOF.
+
* xdisp.c (with_echo_area_buffer): Use echo_kboard instead
of the only temporarily set echoing flag for deciding when
the cancel echoing.
report_file_error ("Setting file position",
Fcons (orig_filename, Qnil));
- total_read = 0;
+ total_read = nread = 0;
while (total_read < trial)
{
nread = emacs_read (fd, buffer + total_read, trial - total_read);
giveup_match_end = 1;
break;
}
+
+ if (nread == 0)
+ break;
}
immediate_quit = 0;