summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 1e03ba1920f..312ecb3852f 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -57,7 +57,10 @@ when it has unsaved changes."
A list of elements of the form (FROM . TO), each meaning to replace
FROM with TO when it appears in a directory name. This replacement is
done when setting up the default directory of a newly visited file.
-*Every* FROM string ought to start with \"\\\\`\".
+
+FROM is matched against directory names anchored at the first
+character, so it should start with a \"\\\\`\", or, if directory
+names cannot have embedded newlines, with a \"^\".
FROM and TO should be equivalent names, which refer to the
same directory. Do not use `~' in the TO strings;
@@ -3775,10 +3778,9 @@ BACKUPNAME is the backup file name, which is the old file renamed."
(rename-file real-file-name backupname t)
(setq setmodes (list modes context backupname)))
(file-error
- ;; If trouble writing the backup, write it in ~.
- (setq backupname (expand-file-name
- (convert-standard-filename
- "~/%backup%~")))
+ ;; If trouble writing the backup, write it in
+ ;; .emacs.d/%backup%.
+ (setq backupname (locate-user-emacs-file "%backup%~"))
(message "Cannot write backup file; backing up in %s"
backupname)
(sleep-for 1)