diff src/fileio.c @ 11632:ddbe0702ea95

(Fdo_auto_save): Record visited file name as well as auto-save file name in the auto-save-list-file-name file. Call Fexpand_file_name for auto-save-list-file-name.
author Richard M. Stallman <rms@gnu.org>
date Sun, 30 Apr 1995 19:50:56 +0000
parents 51bc10be0dc7
children 304577bc9b51
line wrap: on
line diff
--- a/src/fileio.c	Sun Apr 30 19:50:00 1995 +0000
+++ b/src/fileio.c	Sun Apr 30 19:50:56 1995 +0000
@@ -3796,12 +3796,14 @@
 
   if (STRINGP (Vauto_save_list_file_name))
     {
+      Lisp_Object listfile;
+      listfile = Fexpand_file_name (Vauto_save_list_file_name, Qnil);
 #ifdef DOS_NT
-      listdesc = open (XSTRING (Vauto_save_list_file_name)->data, 
+      listdesc = open (XSTRING (listfile)->data, 
 		       O_WRONLY | O_TRUNC | O_CREAT | O_TEXT,
 		       S_IREAD | S_IWRITE);
 #else  /* not DOS_NT */
-      listdesc = creat (XSTRING (Vauto_save_list_file_name)->data, 0666);
+      listdesc = creat (XSTRING (listfile)->data, 0666);
 #endif /* not DOS_NT */
     }
   else
@@ -3823,10 +3825,17 @@
 	b = XBUFFER (buf);
       
 	/* Record all the buffers that have auto save mode
-	   in the special file that lists them.  */
+	   in the special file that lists them.  For each of these buffers,
+	   Record visited name (if any) and auto save name.  */
 	if (STRINGP (b->auto_save_file_name)
 	    && listdesc >= 0 && do_handled_files == 0)
 	  {
+	    if (!NILP (b->filename))
+	      {
+		write (listdesc, XSTRING (b->filename)->data,
+		       XSTRING (b->filename)->size);
+	      }
+	    write (listdesc, "\n", 1);
 	    write (listdesc, XSTRING (b->auto_save_file_name)->data,
 		   XSTRING (b->auto_save_file_name)->size);
 	    write (listdesc, "\n", 1);