Commit 6ce78fdc authored by Michael Albinus's avatar Michael Albinus

* files.el (backup-by-copying-when-mismatch): Make it a buffer local

variable (permanent-local).

* net/tramp.el (tramp-handle-insert-file-contents): Do not set
`permanent-local' property for `(backup-by-copying-when-mismatch'.
parent a16b2d46
2010-11-06 Michael Albinus <michael.albinus@gmx.de>
* files.el (backup-by-copying-when-mismatch): Make it a buffer local
variable (permanent-local).
* net/tramp.el (tramp-handle-insert-file-contents): Do not set
`permanent-local' property for `(backup-by-copying-when-mismatch'.
2010-11-06 Eli Zaretskii <eliz@gnu.org>
* ls-lisp.el (insert-directory): Doc fix. (bug#7285)
......
......@@ -123,6 +123,7 @@ the default for a new file created there by you.
This variable is relevant only if `backup-by-copying' is nil."
:type 'boolean
:group 'backup)
(put 'backup-by-copying-when-mismatch 'permanent-local t)
(defcustom backup-by-copying-when-privileged-mismatch 200
"Non-nil means create backups by copying to preserve a privileged owner.
......
......@@ -5011,8 +5011,7 @@ coding system might not be determined. This function repairs it."
(set-buffer-modified-p nil)
;; For root, preserve owner and group when editing files.
(when (string-equal (file-remote-p filename 'user) "root")
(set (make-local-variable 'backup-by-copying-when-mismatch) t)
(put 'backup-by-copying-when-mismatch 'permanent-local t)))
(set (make-local-variable 'backup-by-copying-when-mismatch) t)))
(when (and (stringp local-copy)
(or remote-copy (null tramp-temp-buffer-file-name)))
(delete-file local-copy))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment