[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/fileio.c,v [EMACS_22_BASE]
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/src/fileio.c,v [EMACS_22_BASE] |
Date: |
Tue, 05 Aug 2008 21:44:02 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Branch: EMACS_22_BASE
Changes by: Chong Yidong <cyd> 08/08/05 21:44:02
Index: fileio.c
===================================================================
RCS file: /sources/emacs/emacs/src/fileio.c,v
retrieving revision 1.580.2.15
retrieving revision 1.580.2.16
diff -u -b -r1.580.2.15 -r1.580.2.16
--- fileio.c 2 Aug 2008 09:29:28 -0000 1.580.2.15
+++ fileio.c 5 Aug 2008 21:44:01 -0000 1.580.2.16
@@ -208,6 +208,9 @@
/* 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 @@
}
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 @@
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'.