diff options
| -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." | |||
| 2844 | 2844 | ||
| 2845 | (defun normal-backup-enable-predicate (name) | 2845 | (defun normal-backup-enable-predicate (name) |
| 2846 | "Default `backup-enable-predicate' function. | 2846 | "Default `backup-enable-predicate' function. |
| 2847 | Checks for files in `temporary-file-directory' or | 2847 | Checks for files in `temporary-file-directory', |
| 2848 | `small-temporary-file-directory'." | 2848 | `small-temporary-file-directory', and /tmp." |
| 2849 | (not (or (let ((comp (compare-strings temporary-file-directory 0 nil | 2849 | (not (or (let ((comp (compare-strings temporary-file-directory 0 nil |
| 2850 | name 0 nil))) | 2850 | name 0 nil))) |
| 2851 | ;; Directory is under temporary-file-directory. | 2851 | ;; Directory is under temporary-file-directory. |
| 2852 | (and (not (eq comp t)) | 2852 | (and (not (eq comp t)) |
| 2853 | (< comp (- (length temporary-file-directory))))) | 2853 | (< comp (- (length temporary-file-directory))))) |
| 2854 | (let ((comp (compare-strings "/tmp" 0 nil | ||
| 2855 | name 0 nil))) | ||
| 2856 | ;; Directory is under /tmp. | ||
| 2857 | (and (not (eq comp t)) | ||
| 2858 | (< comp (- (length "/tmp"))))) | ||
| 2854 | (if small-temporary-file-directory | 2859 | (if small-temporary-file-directory |
| 2855 | (let ((comp (compare-strings small-temporary-file-directory | 2860 | (let ((comp (compare-strings small-temporary-file-directory |
| 2856 | 0 nil | 2861 | 0 nil |