Mercurial > emacs
comparison src/fileio.c @ 28697:7d587a158d1f
(Fdo_auto_save): Create directories for auto-save
list file if necessary.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 24 Apr 2000 18:41:54 +0000 |
parents | 55c84ae4d634 |
children | 0027ff9c083a |
comparison
equal
deleted
inserted
replaced
28696:0c9cb5ad25fc | 28697:7d587a158d1f |
---|---|
297 Lisp_Object Qfile_name_nondirectory; | 297 Lisp_Object Qfile_name_nondirectory; |
298 Lisp_Object Qunhandled_file_name_directory; | 298 Lisp_Object Qunhandled_file_name_directory; |
299 Lisp_Object Qfile_name_as_directory; | 299 Lisp_Object Qfile_name_as_directory; |
300 Lisp_Object Qcopy_file; | 300 Lisp_Object Qcopy_file; |
301 Lisp_Object Qmake_directory_internal; | 301 Lisp_Object Qmake_directory_internal; |
302 Lisp_Object Qmake_directory; | |
302 Lisp_Object Qdelete_directory; | 303 Lisp_Object Qdelete_directory; |
303 Lisp_Object Qdelete_file; | 304 Lisp_Object Qdelete_file; |
304 Lisp_Object Qrename_file; | 305 Lisp_Object Qrename_file; |
305 Lisp_Object Qadd_name_to_file; | 306 Lisp_Object Qadd_name_to_file; |
306 Lisp_Object Qmake_symbolic_link; | 307 Lisp_Object Qmake_symbolic_link; |
5223 if (!NILP (Vrun_hooks)) | 5224 if (!NILP (Vrun_hooks)) |
5224 call1 (Vrun_hooks, intern ("auto-save-hook")); | 5225 call1 (Vrun_hooks, intern ("auto-save-hook")); |
5225 | 5226 |
5226 if (STRINGP (Vauto_save_list_file_name)) | 5227 if (STRINGP (Vauto_save_list_file_name)) |
5227 { | 5228 { |
5228 Lisp_Object listfile; | 5229 Lisp_Object listfile, dir; |
5230 | |
5229 listfile = Fexpand_file_name (Vauto_save_list_file_name, Qnil); | 5231 listfile = Fexpand_file_name (Vauto_save_list_file_name, Qnil); |
5232 | |
5233 dir = Ffile_name_directory (listfile); | |
5234 if (NILP (Ffile_directory_p (dir))) | |
5235 call2 (Qmake_directory, dir, Qt); | |
5236 | |
5230 stream = fopen (XSTRING (listfile)->data, "w"); | 5237 stream = fopen (XSTRING (listfile)->data, "w"); |
5231 if (stream != NULL) | 5238 if (stream != NULL) |
5232 { | 5239 { |
5233 /* Arrange to close that file whether or not we get an error. | 5240 /* Arrange to close that file whether or not we get an error. |
5234 Also reset auto_saving to 0. */ | 5241 Also reset auto_saving to 0. */ |
5698 Qfile_name_nondirectory = intern ("file-name-nondirectory"); | 5705 Qfile_name_nondirectory = intern ("file-name-nondirectory"); |
5699 Qunhandled_file_name_directory = intern ("unhandled-file-name-directory"); | 5706 Qunhandled_file_name_directory = intern ("unhandled-file-name-directory"); |
5700 Qfile_name_as_directory = intern ("file-name-as-directory"); | 5707 Qfile_name_as_directory = intern ("file-name-as-directory"); |
5701 Qcopy_file = intern ("copy-file"); | 5708 Qcopy_file = intern ("copy-file"); |
5702 Qmake_directory_internal = intern ("make-directory-internal"); | 5709 Qmake_directory_internal = intern ("make-directory-internal"); |
5710 Qmake_directory = intern ("make-directory"); | |
5703 Qdelete_directory = intern ("delete-directory"); | 5711 Qdelete_directory = intern ("delete-directory"); |
5704 Qdelete_file = intern ("delete-file"); | 5712 Qdelete_file = intern ("delete-file"); |
5705 Qrename_file = intern ("rename-file"); | 5713 Qrename_file = intern ("rename-file"); |
5706 Qadd_name_to_file = intern ("add-name-to-file"); | 5714 Qadd_name_to_file = intern ("add-name-to-file"); |
5707 Qmake_symbolic_link = intern ("make-symbolic-link"); | 5715 Qmake_symbolic_link = intern ("make-symbolic-link"); |
5729 staticpro (&Qfile_name_nondirectory); | 5737 staticpro (&Qfile_name_nondirectory); |
5730 staticpro (&Qunhandled_file_name_directory); | 5738 staticpro (&Qunhandled_file_name_directory); |
5731 staticpro (&Qfile_name_as_directory); | 5739 staticpro (&Qfile_name_as_directory); |
5732 staticpro (&Qcopy_file); | 5740 staticpro (&Qcopy_file); |
5733 staticpro (&Qmake_directory_internal); | 5741 staticpro (&Qmake_directory_internal); |
5742 staticpro (&Qmake_directory); | |
5734 staticpro (&Qdelete_directory); | 5743 staticpro (&Qdelete_directory); |
5735 staticpro (&Qdelete_file); | 5744 staticpro (&Qdelete_file); |
5736 staticpro (&Qrename_file); | 5745 staticpro (&Qrename_file); |
5737 staticpro (&Qadd_name_to_file); | 5746 staticpro (&Qadd_name_to_file); |
5738 staticpro (&Qmake_symbolic_link); | 5747 staticpro (&Qmake_symbolic_link); |