Commit 9d611ffe authored by Paul Eggert's avatar Paul Eggert

* fileio.c (Finsert_file_contents): Avoid double-close.

Fixes: debbugs:14936
parent 6ccb9cab
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
......
......@@ -3860,7 +3860,11 @@ by calling `format-decode', which see. */)
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment