+2013-07-25 Paul Eggert <eggert@cs.ucla.edu>
+
+ * fileio.c (Finsert_file_contents): Avoid double-close (Bug#14936).
+
2013-07-24 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (redisplay_window): Instead of moving point out of
if (same_at_start - BEGV_BYTE == end_offset - beg_offset)
{
emacs_close (fd);
- specpdl_ptr--;
+
+ /* Discard the unwind protect for closing the file, and any
+ unwind protect for restoring point. */
+ specpdl_ptr = specpdl + fd_index;
+
/* Truncate the buffer to the size of the file. */
del_range_1 (same_at_start, same_at_end, 0, 0);
goto handled;