Yoshiki Hayashi <yoshiki(a)xemacs.org> writes:
Yoshiki Hayashi <yoshiki(a)xemacs.org> writes:
> I also think it is a good plan. I'll implement it after I
> get bored with Mule maze. I'm currently trying to make
> encoded-kb.el work with XEmacs. Functions used there are
> full of incompatibilities...
Here's the patch.
Oops. The patch contains some errors again.
2000-10-30 Yoshiki Hayashi <yoshiki(a)xemacs.org>
* fileio.c (Vauto_save_list_file_prefix): Moved from startup.el.
(inhibit_auto_save_session): New variable.
(vars_of_fileio): Declare and initialize them.
* fileio.c (Fdo_auto_save): Don't create session file if
Vinhibit_auto_save_session or Vauto_save_list_file_prefix is non-nil.
Index: fileio.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/fileio.c,v
retrieving revision 1.51.2.28
diff -u -u -r1.51.2.28 fileio.c
--- fileio.c 2000/10/12 04:59:07 1.51.2.28
+++ fileio.c 2000/10/30 05:52:50
@@ -94,6 +94,12 @@
/* File name in which we write a list of all our auto save files. */
Lisp_Object Vauto_save_list_file_name;
+/* Prefix used to construct Vauto_save_list_file_name. */
+Lisp_Object Vauto_save_list_file_prefix;
+
+/* When non-nil, it prevents auto-save list file creation. */
+int inhibit_auto_save_session;
+
int disable_auto_save_when_buffer_shrinks;
Lisp_Object Vdirectory_sep_char;
@@ -3982,7 +3988,9 @@
/* Open the auto-save list file, if necessary.
We only do this now so that the file only exists
if we actually auto-saved any files. */
- if (!auto_saved && STRINGP (listfile) && listdesc < 0)
+ if (!auto_saved && !inhibit_auto_save_session
+ && !NILP (Vauto_save_list_file_prefix)
+ && STRINGP (listfile) && listdesc < 0)
{
listdesc = open ((char *) XSTRING_DATA (listfile),
O_WRONLY | O_TRUNC | O_CREAT | OPEN_BINARY,
@@ -4297,6 +4305,18 @@
File name in which we write a list of all auto save file names.
*/ );
Vauto_save_list_file_name = Qnil;
+
+ DEFVAR_LISP ("auto-save-list-file-prefix", &Vauto_save_list_file_prefix
/*
+Prefix for generating auto-save-list-file-name.
+Emacs's pid and the system name will be appended to
+this prefix to create a unique file name.
+*/ );
+ Vauto_save_list_file_prefix = build_string ("~/.saves-");
+
+ DEFVAR_BOOL ("inhibit-auto-save-session", &inhibit_auto_save_session /*
+When non-nil, inhibit auto save list file creation.
+*/ );
+ inhibit_auto_save_session = 0;
DEFVAR_BOOL ("disable-auto-save-when-buffer-shrinks",
&disable_auto_save_when_buffer_shrinks /*
--
Yoshiki Hayashi