diff options
| author | Richard M. Stallman | 1997-08-17 23:20:07 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-08-17 23:20:07 +0000 |
| commit | 0eff1f85acea7e81934ed8f34b4e382f4d66aade (patch) | |
| tree | 0bef05d6532dd9eedca5174457eae99a66ef57ee /src | |
| parent | 99bf72f2eec6333920e91db988767b61e4dec927 (diff) | |
| download | emacs-0eff1f85acea7e81934ed8f34b4e382f4d66aade.tar.gz emacs-0eff1f85acea7e81934ed8f34b4e382f4d66aade.zip | |
(Fdo_auto_save): If open fails, make lispstream nil.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/fileio.c b/src/fileio.c index 303f9e143cd..d82cc274199 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -4536,12 +4536,16 @@ A non-nil CURRENT-ONLY argument means save only current buffer.") | |||
| 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 | { |