diff options
| author | Chong Yidong | 2008-08-05 21:41:14 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-08-05 21:41:14 +0000 |
| commit | 699b53bcf0d72a3ff2387f20349670af2ca5184d (patch) | |
| tree | 311e36ef5df12f7b3f8b46dfc91f50d5e0518cad /src | |
| parent | cd7f53ca92c34bcbe42e672e76425e95ed055965 (diff) | |
| download | emacs-699b53bcf0d72a3ff2387f20349670af2ca5184d.tar.gz emacs-699b53bcf0d72a3ff2387f20349670af2ca5184d.zip | |
(Vauto_save_list_file_name): Move here from file.el.
(auto_save_1): Update modtime when auto-save-list-file-name is on.
Diffstat (limited to 'src')
| -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 69eac9a7e98..d289f426eb1 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -185,6 +185,9 @@ Lisp_Object Vwrite_region_annotations_so_far; | |||
| 185 | /* File name in which we write a list of all our auto save files. */ | 185 | /* File name in which we write a list of all our auto save files. */ |
| 186 | Lisp_Object Vauto_save_list_file_name; | 186 | Lisp_Object Vauto_save_list_file_name; |
| 187 | 187 | ||
| 188 | /* Whether or not files are auto-saved into themselves. */ | ||
| 189 | Lisp_Object Vauto_save_visited_file_name; | ||
| 190 | |||
| 188 | /* On NT, specifies the directory separator character, used (eg.) when | 191 | /* On NT, specifies the directory separator character, used (eg.) when |
| 189 | expanding file names. This can be bound to / or \. */ | 192 | expanding file names. This can be bound to / or \. */ |
| 190 | Lisp_Object Vdirectory_sep_char; | 193 | Lisp_Object Vdirectory_sep_char; |
| @@ -5099,9 +5102,9 @@ auto_save_1 () | |||
| 5099 | } | 5102 | } |
| 5100 | 5103 | ||
| 5101 | return | 5104 | return |
| 5102 | Fwrite_region (Qnil, Qnil, | 5105 | Fwrite_region (Qnil, Qnil, current_buffer->auto_save_file_name, Qnil, |
| 5103 | current_buffer->auto_save_file_name, | 5106 | NILP (Vauto_save_visited_file_name) ? Qlambda : Qt, |
| 5104 | Qnil, Qlambda, Qnil, Qnil); | 5107 | Qnil, Qnil); |
| 5105 | } | 5108 | } |
| 5106 | 5109 | ||
| 5107 | static Lisp_Object | 5110 | static Lisp_Object |
| @@ -5646,6 +5649,11 @@ shortly after Emacs reads your `.emacs' file, if you have not yet given it | |||
| 5646 | a non-nil value. */); | 5649 | a non-nil value. */); |
| 5647 | Vauto_save_list_file_name = Qnil; | 5650 | Vauto_save_list_file_name = Qnil; |
| 5648 | 5651 | ||
| 5652 | DEFVAR_LISP ("auto-save-visited-file-name", &Vauto_save_visited_file_name, | ||
| 5653 | doc: /* Non-nil says auto-save a buffer in the file it is visiting, when practical. | ||
| 5654 | Normally auto-save files are written under other names. */); | ||
| 5655 | Vauto_save_visited_file_name = Qnil; | ||
| 5656 | |||
| 5649 | #ifdef HAVE_FSYNC | 5657 | #ifdef HAVE_FSYNC |
| 5650 | DEFVAR_BOOL ("write-region-inhibit-fsync", &write_region_inhibit_fsync, | 5658 | DEFVAR_BOOL ("write-region-inhibit-fsync", &write_region_inhibit_fsync, |
| 5651 | doc: /* *Non-nil means don't call fsync in `write-region'. | 5659 | doc: /* *Non-nil means don't call fsync in `write-region'. |