diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2008-08-05 21:44:01 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2008-08-05 21:44:01 +0000 |
commit | f8a12fae315e95f326469e63268b60bd9a9ba738 (patch) | |
tree | 5fb7ed0cc77df4eb10169ea74b535596ac847c00 | |
parent | c0a4fe8c0840910790f20b8eaed47c1730122623 (diff) | |
download | emacs-f8a12fae315e95f326469e63268b60bd9a9ba738.tar.gz |
(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; /* File name in which we write a list of all our auto save files. */ Lisp_Object Vauto_save_list_file_name; +/* Whether or not files are auto-saved into themselves. */ +Lisp_Object Vauto_save_visited_file_name; + /* Function to call to read a file name. */ Lisp_Object Vread_file_name_function; @@ -5824,9 +5827,9 @@ auto_save_1 () } return - Fwrite_region (Qnil, Qnil, - current_buffer->auto_save_file_name, - Qnil, Qlambda, Qnil, Qnil); + Fwrite_region (Qnil, Qnil, current_buffer->auto_save_file_name, Qnil, + NILP (Vauto_save_visited_file_name) ? Qlambda : Qt, + Qnil, Qnil); } static Lisp_Object @@ -6772,6 +6775,11 @@ shortly after Emacs reads your `.emacs' file, if you have not yet given it a non-nil value. */); Vauto_save_list_file_name = Qnil; + DEFVAR_LISP ("auto-save-visited-file-name", &Vauto_save_visited_file_name, + doc: /* Non-nil says auto-save a buffer in the file it is visiting, when practical. +Normally auto-save files are written under other names. */); + Vauto_save_visited_file_name = Qnil; + #ifdef HAVE_FSYNC DEFVAR_BOOL ("write-region-inhibit-fsync", &write_region_inhibit_fsync, doc: /* *Non-nil means don't call fsync in `write-region'. |