From 258fd2cb821e795707e0cb78e1dcfb3611aa8637 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 30 Apr 1995 19:50:56 +0000 Subject: [PATCH] (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. --- src/fileio.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index 5a64a1d989e..a01ef67c221 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3796,12 +3796,14 @@ Non-nil second argument means save only current buffer.") 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 @@ Non-nil second argument means save only current buffer.") 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); -- 2.39.5