diff options
author | Richard M. Stallman <rms@gnu.org> | 2005-01-29 17:28:00 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2005-01-29 17:28:00 +0000 |
commit | 0c2f6ddaa7e5dccc2ec4a3c63bdc445cb6b50d52 (patch) | |
tree | 42ed5409157c70de78789eba485a98a705f5d69f /lisp/files.el | |
parent | 5a0c1883d4226873ef1a55b6943afd6e93b4af77 (diff) | |
download | emacs-0c2f6ddaa7e5dccc2ec4a3c63bdc445cb6b50d52.tar.gz |
(normal-backup-enable-predicate): Return nil for files
in /tmp, regardless of temporary-file-directory.
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/files.el b/lisp/files.el index 841332b957a..045958bf9c5 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2844,13 +2844,18 @@ ignored." (defun normal-backup-enable-predicate (name) "Default `backup-enable-predicate' function. -Checks for files in `temporary-file-directory' or -`small-temporary-file-directory'." +Checks for files in `temporary-file-directory', +`small-temporary-file-directory', and /tmp." (not (or (let ((comp (compare-strings temporary-file-directory 0 nil name 0 nil))) ;; Directory is under temporary-file-directory. (and (not (eq comp t)) (< comp (- (length temporary-file-directory))))) + (let ((comp (compare-strings "/tmp" 0 nil + name 0 nil))) + ;; Directory is under /tmp. + (and (not (eq comp t)) + (< comp (- (length "/tmp"))))) (if small-temporary-file-directory (let ((comp (compare-strings small-temporary-file-directory 0 nil |