diff options
| author | Chong Yidong | 2008-08-05 21:44:01 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-08-05 21:44:01 +0000 |
| commit | f8a12fae315e95f326469e63268b60bd9a9ba738 (patch) | |
| tree | 5fb7ed0cc77df4eb10169ea74b535596ac847c00 | |
| parent | c0a4fe8c0840910790f20b8eaed47c1730122623 (diff) | |
| download | emacs-f8a12fae315e95f326469e63268b60bd9a9ba738.tar.gz emacs-f8a12fae315e95f326469e63268b60bd9a9ba738.zip | |
(Vauto_save_list_file_name): Move here from file.el.
(auto_save_1): Update modtime when auto-save-list-file-name is on.
| -rw-r--r-- | src/fileio.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/fileio.c b/src/fileio.c index 4f703a8a743..81836bd8213 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -208,6 +208,9 @@ Lisp_Object Vwrite_region_annotations_so_far; | |||
| 208 | /* File name in which we write a list of all our auto save files. */ | 208 | /* File name in which we write a list of all our auto save files. */ |
| 209 | Lisp_Object Vauto_save_list_file_name; | 209 | Lisp_Object Vauto_save_list_file_name; |
| 210 | 210 | ||
| 211 | /* Whether or not files are auto-saved into themselves. */ | ||
| 212 | Lisp_Object Vauto_save_visited_file_name; | ||
| 213 | |||
| 211 | /* Function to call to read a file name. */ | 214 | /* Function to call to read a file name. */ |
| 212 | Lisp_Object Vread_file_name_function; | 215 | Lisp_Object Vread_file_name_function; |
| 213 | 216 | ||
| @@ -5824,9 +5827,9 @@ auto_save_1 () | |||
| 5824 | } | 5827 | } |
| 5825 | 5828 | ||
| 5826 | return | 5829 | return |
| 5827 | Fwrite_region (Qnil, Qnil, | 5830 | Fwrite_region (Qnil, Qnil, current_buffer->auto_save_file_name, Qnil, |
| 5828 | current_buffer->auto_save_file_name, | 5831 | NILP (Vauto_save_visited_file_name) ? Qlambda : Qt, |
| 5829 | Qnil, Qlambda, Qnil, Qnil); | 5832 | Qnil, Qnil); |
| 5830 | } | 5833 | } |
| 5831 | 5834 | ||
| 5832 | static Lisp_Object | 5835 | static Lisp_Object |
| @@ -6772,6 +6775,11 @@ shortly after Emacs reads your `.emacs' file, if you have not yet given it | |||
| 6772 | a non-nil value. */); | 6775 | a non-nil value. */); |
| 6773 | Vauto_save_list_file_name = Qnil; | 6776 | Vauto_save_list_file_name = Qnil; |
| 6774 | 6777 | ||
| 6778 | DEFVAR_LISP ("auto-save-visited-file-name", &Vauto_save_visited_file_name, | ||
| 6779 | doc: /* Non-nil says auto-save a buffer in the file it is visiting, when practical. | ||
| 6780 | Normally auto-save files are written under other names. */); | ||
| 6781 | Vauto_save_visited_file_name = Qnil; | ||
| 6782 | |||
| 6775 | #ifdef HAVE_FSYNC | 6783 | #ifdef HAVE_FSYNC |
| 6776 | DEFVAR_BOOL ("write-region-inhibit-fsync", &write_region_inhibit_fsync, | 6784 | DEFVAR_BOOL ("write-region-inhibit-fsync", &write_region_inhibit_fsync, |
| 6777 | doc: /* *Non-nil means don't call fsync in `write-region'. | 6785 | doc: /* *Non-nil means don't call fsync in `write-region'. |