diff options
author | Richard M. Stallman <rms@gnu.org> | 2005-04-30 20:14:32 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2005-04-30 20:14:32 +0000 |
commit | 689accb820a12726de605d3b12f32e48d39ba1a3 (patch) | |
tree | 965d1e0f5bc0a2c7cc613d6f1c7ea2697b34d780 /lisp/files.el | |
parent | 53ec26edede151a986ca4d828efb58c9ecc4edd6 (diff) | |
download | emacs-689accb820a12726de605d3b12f32e48d39ba1a3.tar.gz |
(backup-buffer-copy): Use copy-file instead
of write-region, and put back the 'excl.
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lisp/files.el b/lisp/files.el index 5d7eff99548..a2b74f8273e 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2761,14 +2761,12 @@ BACKUPNAME is the backup file name, which is the old file renamed." (condition-case nil (delete-file to-name) (file-error nil)) - (write-region "" nil to-name nil 'silent nil 'excl) + (copy-file from-name to-name t t 'excl) nil) (file-already-exists t)) - ;; the file was somehow created by someone else between - ;; `make-temp-name' and `write-region', let's try again. - nil) -; (copy-file from-name to-name t t 'excl)) - (copy-file from-name to-name t t)) + ;; The file was somehow created by someone else between + ;; `delete-file' and `copy-file', so let's try again. + nil)) ;; Reset the umask. (set-default-file-modes umask))) (and modes |