User: youngs
Date: 05/04/04 01:57:38
Modified: xemacs/lisp ChangeLog files.el
Log:
2005-04-04 Steve Youngs <steve(a)sxemacs.org>
* files.el (backup-buffer): Write "%backup%~" in
`auto-save-directory' and fall back to $HOME if for some reason
that isn't possible.
Suggested By: Jamie Zawinski <jwz(a)jwz.org>
Revision Changes Path
1.659 +7 -0 XEmacs/xemacs/lisp/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/ChangeLog,v
retrieving revision 1.658
retrieving revision 1.659
diff -u -p -r1.658 -r1.659
--- ChangeLog 2005/03/31 11:28:41 1.658
+++ ChangeLog 2005/04/03 23:57:36 1.659
@@ -1,3 +1,10 @@
+2005-04-04 Steve Youngs <steve(a)sxemacs.org>
+
+ * files.el (backup-buffer): Write "%backup%~" in
+ `auto-save-directory' and fall back to $HOME if for some reason
+ that isn't possible.
+ Suggested By: Jamie Zawinski <jwz(a)jwz.org>
+
2005-03-31 Aidan Kehoe <kehoea(a)parhasard.net>
* faces.el (face-complain-about-font):
1.73 +8 -3 XEmacs/xemacs/lisp/files.el
Index: files.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/files.el,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -p -r1.72 -r1.73
--- files.el 2005/03/17 09:26:09 1.72
+++ files.el 2005/04/03 23:57:37 1.73
@@ -2390,10 +2390,15 @@ no longer accessible under its old name.
(rename-file real-file-name backupname t)
(setq setmodes (file-modes backupname)))
(file-error
- ;; If trouble writing the backup, write it in ~.
+ ;; If trouble writing the backup, write
+ ;; it in `auto-save-directory'. Fall
+ ;; back to $HOME if that's not possible.
(setq backupname
- (expand-file-name
- (convert-standard-filename "~/%backup%~")))
+ (expand-file-name "%backup%~"
+ (or (when (and auto-save-directory
+ (file-writable-p auto-save-directory))
+ auto-save-directory)
+ (getenv "HOME"))))
(lwarn 'file 'alert "Cannot write backup file; backing up in
%s"
(file-name-nondirectory backupname))
(sleep-for 1)