aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-04-30 19:50:56 +0000
committerRichard M. Stallman1995-04-30 19:50:56 +0000
commit258fd2cb821e795707e0cb78e1dcfb3611aa8637 (patch)
tree8b809d9659b395fb848f36b2524b032c146f6147
parent0b9d4cf065bccd1a0588a12c60cb935f3c9986ef (diff)
downloademacs-258fd2cb821e795707e0cb78e1dcfb3611aa8637.tar.gz
emacs-258fd2cb821e795707e0cb78e1dcfb3611aa8637.zip
(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.
-rw-r--r--src/fileio.c15
1 files 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.")
3796 3796
3797 if (STRINGP (Vauto_save_list_file_name)) 3797 if (STRINGP (Vauto_save_list_file_name))
3798 { 3798 {
3799 Lisp_Object listfile;
3800 listfile = Fexpand_file_name (Vauto_save_list_file_name, Qnil);
3799#ifdef DOS_NT 3801#ifdef DOS_NT
3800 listdesc = open (XSTRING (Vauto_save_list_file_name)->data, 3802 listdesc = open (XSTRING (listfile)->data,
3801 O_WRONLY | O_TRUNC | O_CREAT | O_TEXT, 3803 O_WRONLY | O_TRUNC | O_CREAT | O_TEXT,
3802 S_IREAD | S_IWRITE); 3804 S_IREAD | S_IWRITE);
3803#else /* not DOS_NT */ 3805#else /* not DOS_NT */
3804 listdesc = creat (XSTRING (Vauto_save_list_file_name)->data, 0666); 3806 listdesc = creat (XSTRING (listfile)->data, 0666);
3805#endif /* not DOS_NT */ 3807#endif /* not DOS_NT */
3806 } 3808 }
3807 else 3809 else
@@ -3823,10 +3825,17 @@ Non-nil second argument means save only current buffer.")
3823 b = XBUFFER (buf); 3825 b = XBUFFER (buf);
3824 3826
3825 /* Record all the buffers that have auto save mode 3827 /* Record all the buffers that have auto save mode
3826 in the special file that lists them. */ 3828 in the special file that lists them. For each of these buffers,
3829 Record visited name (if any) and auto save name. */
3827 if (STRINGP (b->auto_save_file_name) 3830 if (STRINGP (b->auto_save_file_name)
3828 && listdesc >= 0 && do_handled_files == 0) 3831 && listdesc >= 0 && do_handled_files == 0)
3829 { 3832 {
3833 if (!NILP (b->filename))
3834 {
3835 write (listdesc, XSTRING (b->filename)->data,
3836 XSTRING (b->filename)->size);
3837 }
3838 write (listdesc, "\n", 1);
3830 write (listdesc, XSTRING (b->auto_save_file_name)->data, 3839 write (listdesc, XSTRING (b->auto_save_file_name)->data,
3831 XSTRING (b->auto_save_file_name)->size); 3840 XSTRING (b->auto_save_file_name)->size);
3832 write (listdesc, "\n", 1); 3841 write (listdesc, "\n", 1);