Commit 5badd6a0 authored by Karl Heuer's avatar Karl Heuer
Browse files

(do_auto_save_unwind): Don't close DESC if DESC < 0.

(Fdo_auto_save): Unconditionally set up unwind-protect.
parent 1efa2983
......@@ -3827,7 +3827,8 @@ do_auto_save_unwind (desc) /* used as unwind-protect function */
Lisp_Object desc;
{
auto_saving = 0;
close (XINT (desc));
if (XINT (desc) >= 0)
close (XINT (desc));
return Qnil;
}
......@@ -3887,8 +3888,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer.")
/* Arrange to close that file whether or not we get an error.
Also reset auto_saving to 0. */
if (listdesc >= 0)
record_unwind_protect (do_auto_save_unwind, make_number (listdesc));
record_unwind_protect (do_auto_save_unwind, make_number (listdesc));
auto_saving = 1;
......
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