summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1996-01-09 23:39:43 +0000
committerKarl Heuer <kwzh@gnu.org>1996-01-09 23:39:43 +0000
commitd4aa40750883fcdfd0cfb4a57a8648b618192b06 (patch)
tree99c6d0d75f0e8b1e0c8948ddd82c21378da82c43 /src
parent0b311c376cc7c895e1704b979f64fa3b396e95c6 (diff)
downloademacs-d4aa40750883fcdfd0cfb4a57a8648b618192b06.tar.gz
(do_auto_save_unwind): Don't close DESC if DESC < 0.
(Fdo_auto_save): Unconditionally set up unwind-protect.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 626a69d40f6..41857c43350 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -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;