]> git.eshelyaron.com Git - emacs.git/commitdiff
* tramp.texi (Auto-save and Backup): Disable backups just for a
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 8 Nov 2009 10:49:06 +0000 (10:49 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Sun, 8 Nov 2009 10:49:06 +0000 (10:49 +0000)
method.

doc/misc/ChangeLog
doc/misc/tramp.texi

index 5d08081ec00db92db48410e2be911d63cf9fabb1..d18dbea3b7fe85b4c2bf2c46c1bbc27125d2e70d 100644 (file)
@@ -1,3 +1,10 @@
+2009-11-08  Michael Albinus  <michael.albinus@gmx.de>
+
+       * tramp.texi (Auto-save and Backup): Disable backups just for a
+       method.
+
+       * trampver.texi: Update release number.
+
 2009-11-07  Michael Albinus  <michael.albinus@gmx.de>
 
        Sync with Tramp 2.1.17.
index 8b82c3638afc96c490a92ac50ae6d614941c9b6a..2c48fe32c55ddcd962bfa1e90cd27f7db24ce91f 100644 (file)
@@ -2057,6 +2057,23 @@ for @value{tramp} files:
 @end lisp
 @end ifset
 
+@ifset emacs
+It is also possible to disable backups depending on the used method.
+The following code disables backups for the @option{su} and
+@option{sudo} methods:
+
+@lisp
+(setq backup-enable-predicate
+      (lambda (name)
+        (and (normal-backup-enable-predicate name)
+             (not
+              (let ((method (file-remote-p name 'method)))
+                (when (stringp method)
+                  (member method '("su" "sudo"))))))))
+@end lisp
+@end ifset
+
+
 Another possibility is to use the @value{tramp} variable
 @ifset emacs
 @code{tramp-backup-directory-alist}.