From 5badd6a0ad3fcd784c127205ee5fb8d7a8b04034 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Tue, 9 Jan 1996 23:39:43 +0000 Subject: [PATCH] (do_auto_save_unwind): Don't close DESC if DESC < 0. (Fdo_auto_save): Unconditionally set up unwind-protect. --- src/fileio.c | 6 +++--- 1 file 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; -- 2.39.2