Mercurial > emacs
diff src/fileio.c @ 19401:2ada2106a39c
(Fdo_auto_save): If open fails, make lispstream nil.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 17 Aug 1997 23:20:07 +0000 |
parents | 8ece1f8d2ff6 |
children | 6591ac0b83d9 |
line wrap: on
line diff
--- a/src/fileio.c Sun Aug 17 01:49:50 1997 +0000 +++ b/src/fileio.c Sun Aug 17 23:20:07 1997 +0000 @@ -4536,12 +4536,16 @@ 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 {