comparison 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
comparison
equal deleted inserted replaced
19400:95183e63d1dd 19401:2ada2106a39c
4534 if (STRINGP (Vauto_save_list_file_name)) 4534 if (STRINGP (Vauto_save_list_file_name))
4535 { 4535 {
4536 Lisp_Object listfile; 4536 Lisp_Object listfile;
4537 listfile = Fexpand_file_name (Vauto_save_list_file_name, Qnil); 4537 listfile = Fexpand_file_name (Vauto_save_list_file_name, Qnil);
4538 stream = fopen (XSTRING (listfile)->data, "w"); 4538 stream = fopen (XSTRING (listfile)->data, "w");
4539 4539 if (stream != NULL)
4540 /* Arrange to close that file whether or not we get an error. 4540 {
4541 Also reset auto_saving to 0. */ 4541 /* Arrange to close that file whether or not we get an error.
4542 lispstream = Fcons (Qnil, Qnil); 4542 Also reset auto_saving to 0. */
4543 XSETFASTINT (XCONS (lispstream)->car, (EMACS_UINT)stream >> 16); 4543 lispstream = Fcons (Qnil, Qnil);
4544 XSETFASTINT (XCONS (lispstream)->cdr, (EMACS_UINT)stream & 0xffff); 4544 XSETFASTINT (XCONS (lispstream)->car, (EMACS_UINT)stream >> 16);
4545 XSETFASTINT (XCONS (lispstream)->cdr, (EMACS_UINT)stream & 0xffff);
4546 }
4547 else
4548 lispstream = Qnil;
4545 } 4549 }
4546 else 4550 else
4547 { 4551 {
4548 stream = NULL; 4552 stream = NULL;
4549 lispstream = Qnil; 4553 lispstream = Qnil;