diff options
| author | Gerd Moellmann | 2001-05-31 09:59:12 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-05-31 09:59:12 +0000 |
| commit | 0894672ffabccfea2ddeb2d01bb27d12c4853191 (patch) | |
| tree | 99f229aeb690be7a68f11fadc0b865ad6fbfb558 /src | |
| parent | 94843cc1b16b244fc7989005d074c1e71d5a1865 (diff) | |
| download | emacs-0894672ffabccfea2ddeb2d01bb27d12c4853191.tar.gz emacs-0894672ffabccfea2ddeb2d01bb27d12c4853191.zip | |
(Fdo_auto_save): Don't try to create the directory of
auto-save-list-file-name when shutting down Emacs, because
creating the directory might signal an error, and leaves
Emacs in a strange state.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/fileio.c | 17 |
2 files changed, 17 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index a306c7f70da..1f0283fe4c2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2001-05-31 Gerd Moellmann <gerd@gnu.org> | 1 | 2001-05-31 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * fileio.c (Fdo_auto_save): Don't try to create the directory of | ||
| 4 | auto-save-list-file-name when shutting down Emacs, because | ||
| 5 | creating the directory might signal an error, and leaves | ||
| 6 | Emacs in a strange state. | ||
| 7 | |||
| 3 | * term.c: (tty_cursor_hidden): New variable. | 8 | * term.c: (tty_cursor_hidden): New variable. |
| 4 | (update_begin): Don't call tty_hide_cursor. Clean up. | 9 | (update_begin): Don't call tty_hide_cursor. Clean up. |
| 5 | (update_end, set_terminal_window, set_scroll_region): Clean up. | 10 | (update_end, set_terminal_window, set_scroll_region): Clean up. |
diff --git a/src/fileio.c b/src/fileio.c index 8b6c0bd165a..9987cbfd343 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -5370,13 +5370,20 @@ A non-nil CURRENT-ONLY argument means save only current buffer.") | |||
| 5370 | 5370 | ||
| 5371 | if (STRINGP (Vauto_save_list_file_name)) | 5371 | if (STRINGP (Vauto_save_list_file_name)) |
| 5372 | { | 5372 | { |
| 5373 | Lisp_Object listfile, dir; | 5373 | Lisp_Object listfile; |
| 5374 | 5374 | ||
| 5375 | listfile = Fexpand_file_name (Vauto_save_list_file_name, Qnil); | 5375 | listfile = Fexpand_file_name (Vauto_save_list_file_name, Qnil); |
| 5376 | 5376 | ||
| 5377 | dir = Ffile_name_directory (listfile); | 5377 | /* Don't try to create the directory when shutting down Emacs, |
| 5378 | if (NILP (Ffile_directory_p (dir))) | 5378 | because creating the directory might signal an error, and |
| 5379 | call2 (Qmake_directory, dir, Qt); | 5379 | that would leave Emacs in a strange state. */ |
| 5380 | if (!NILP (Vrun_hooks)) | ||
| 5381 | { | ||
| 5382 | Lisp_Object dir; | ||
| 5383 | dir = Ffile_name_directory (listfile); | ||
| 5384 | if (NILP (Ffile_directory_p (dir))) | ||
| 5385 | call2 (Qmake_directory, dir, Qt); | ||
| 5386 | } | ||
| 5380 | 5387 | ||
| 5381 | stream = fopen (XSTRING (listfile)->data, "w"); | 5388 | stream = fopen (XSTRING (listfile)->data, "w"); |
| 5382 | if (stream != NULL) | 5389 | if (stream != NULL) |