Commit 0eff1f85 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

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

parent 99bf72f2
......@@ -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
{
......
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