diff options
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/files.el | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a5de824ab06..bd8f9b34379 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2006-12-17 Richard Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * files.el (magic-mode-alist): Mark as risky. | ||
| 4 | |||
| 5 | * files.el (make-backup-file-name-1): | ||
| 6 | Expand backup-directory explicitly. | ||
| 7 | |||
| 1 | 2006-12-17 Michael Albinus <michael.albinus@gmx.de> | 8 | 2006-12-17 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 9 | ||
| 3 | * net/tramp.el (tramp-default-method): Before setting to "pscp", | 10 | * net/tramp.el (tramp-default-method): Before setting to "pscp", |
diff --git a/lisp/files.el b/lisp/files.el index 141fe9f26c9..6c9b9a7542e 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2141,6 +2141,7 @@ to decide the buffer's major mode. | |||
| 2141 | 2141 | ||
| 2142 | If FUNCTION is nil, then it is not called. (That is a way of saying | 2142 | If FUNCTION is nil, then it is not called. (That is a way of saying |
| 2143 | \"allow `auto-mode-alist' to decide for these files.\")") | 2143 | \"allow `auto-mode-alist' to decide for these files.\")") |
| 2144 | (put 'magic-mode-alist 'risky-local-variable t) | ||
| 2144 | 2145 | ||
| 2145 | (defvar magic-mode-regexp-match-limit 4000 | 2146 | (defvar magic-mode-regexp-match-limit 4000 |
| 2146 | "Upper limit on `magic-mode-alist' regexp matches.") | 2147 | "Upper limit on `magic-mode-alist' regexp matches.") |
| @@ -3228,6 +3229,12 @@ doesn't exist, it is created." | |||
| 3228 | (if (string-match (car elt) file) | 3229 | (if (string-match (car elt) file) |
| 3229 | (setq backup-directory (cdr elt) | 3230 | (setq backup-directory (cdr elt) |
| 3230 | alist nil))) | 3231 | alist nil))) |
| 3232 | ;; If backup-directory is relative, it should be relative to the | ||
| 3233 | ;; file's directory. By expanding explicitly here, we avoid | ||
| 3234 | ;; depending on default-directory. | ||
| 3235 | (if backup-directory | ||
| 3236 | (setq backup-directory (expand-file-name backup-directory | ||
| 3237 | (file-name-directory file)))) | ||
| 3231 | (if (and backup-directory (not (file-exists-p backup-directory))) | 3238 | (if (and backup-directory (not (file-exists-p backup-directory))) |
| 3232 | (condition-case nil | 3239 | (condition-case nil |
| 3233 | (make-directory backup-directory 'parents) | 3240 | (make-directory backup-directory 'parents) |