1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-29 00:31:01 -08:00

(Fdo_auto_save): If open fails, make lispstream nil.

This commit is contained in:
Richard M. Stallman 1997-08-17 23:20:07 +00:00
parent 99bf72f2ee
commit 0eff1f85ac

View file

@ -4536,12 +4536,16 @@ A non-nil CURRENT-ONLY argument means save only current buffer.")
Lisp_Object listfile;
listfile = Fexpand_file_name (Vauto_save_list_file_name, Qnil);
stream = fopen (XSTRING (listfile)->data, "w");
/* Arrange to close that file whether or not we get an error.
Also reset auto_saving to 0. */
lispstream = Fcons (Qnil, Qnil);
XSETFASTINT (XCONS (lispstream)->car, (EMACS_UINT)stream >> 16);
XSETFASTINT (XCONS (lispstream)->cdr, (EMACS_UINT)stream & 0xffff);
if (stream != NULL)
{
/* Arrange to close that file whether or not we get an error.
Also reset auto_saving to 0. */
lispstream = Fcons (Qnil, Qnil);
XSETFASTINT (XCONS (lispstream)->car, (EMACS_UINT)stream >> 16);
XSETFASTINT (XCONS (lispstream)->cdr, (EMACS_UINT)stream & 0xffff);
}
else
lispstream = Qnil;
}
else
{