diff options
author | Gerd Moellmann <gerd@gnu.org> | 2001-05-31 09:59:12 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2001-05-31 09:59:12 +0000 |
commit | 0894672ffabccfea2ddeb2d01bb27d12c4853191 (patch) | |
tree | 99f229aeb690be7a68f11fadc0b865ad6fbfb558 | |
parent | 94843cc1b16b244fc7989005d074c1e71d5a1865 (diff) | |
download | emacs-0894672ffabccfea2ddeb2d01bb27d12c4853191.tar.gz emacs-0894672ffabccfea2ddeb2d01bb27d12c4853191.tar.bz2 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.
-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 @@ 2001-05-31 Gerd Moellmann <gerd@gnu.org> + * fileio.c (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. + * term.c: (tty_cursor_hidden): New variable. (update_begin): Don't call tty_hide_cursor. Clean up. (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.") if (STRINGP (Vauto_save_list_file_name)) { - Lisp_Object listfile, dir; + Lisp_Object listfile; listfile = Fexpand_file_name (Vauto_save_list_file_name, Qnil); - - dir = Ffile_name_directory (listfile); - if (NILP (Ffile_directory_p (dir))) - call2 (Qmake_directory, dir, Qt); + + /* Don't try to create the directory when shutting down Emacs, + because creating the directory might signal an error, and + that would leave Emacs in a strange state. */ + if (!NILP (Vrun_hooks)) + { + Lisp_Object dir; + dir = Ffile_name_directory (listfile); + if (NILP (Ffile_directory_p (dir))) + call2 (Qmake_directory, dir, Qt); + } stream = fopen (XSTRING (listfile)->data, "w"); if (stream != NULL) |