From: Michael Albinus Date: Sat, 6 Nov 2010 14:04:23 +0000 (+0100) Subject: * files.el (backup-by-copying-when-mismatch): Make it a buffer local X-Git-Tag: emacs-pretest-23.2.90~9 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6ce78fdc207098b4932a19e8f1dd5293264037d4;p=emacs.git * 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'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 135e1ea750f..d7762db1919 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2010-11-06 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'. + 2010-11-06 Eli Zaretskii * ls-lisp.el (insert-directory): Doc fix. (bug#7285) diff --git a/lisp/files.el b/lisp/files.el index 02f5f8fdacf..0664bfd3844 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -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. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 50fbaed01e0..17c8c074c46 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -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))