diff options
| -rw-r--r-- | lisp/files.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el index ee56e4d3bf2..144d79da28e 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -1189,7 +1189,7 @@ unless NOMODES is non-nil." | |||
| 1189 | (msg | 1189 | (msg |
| 1190 | (cond ((and error (file-attributes buffer-file-name)) | 1190 | (cond ((and error (file-attributes buffer-file-name)) |
| 1191 | (setq buffer-read-only t) | 1191 | (setq buffer-read-only t) |
| 1192 | "File exists, but cannot be read.") | 1192 | "File exists, but cannot be read") |
| 1193 | ((not buffer-read-only) | 1193 | ((not buffer-read-only) |
| 1194 | (if (and warn | 1194 | (if (and warn |
| 1195 | (file-newer-than-file-p (make-auto-save-file-name) | 1195 | (file-newer-than-file-p (make-auto-save-file-name) |
| @@ -1216,6 +1216,10 @@ unless NOMODES is non-nil." | |||
| 1216 | (or not-serious (sit-for 1 nil t))))) | 1216 | (or not-serious (sit-for 1 nil t))))) |
| 1217 | (if (and auto-save-default (not noauto)) | 1217 | (if (and auto-save-default (not noauto)) |
| 1218 | (auto-save-mode t))) | 1218 | (auto-save-mode t))) |
| 1219 | ;; Make people do a little extra work (C-x C-q) | ||
| 1220 | ;; before altering a backup file. | ||
| 1221 | (if (backup-file-name-p buffer-file-name) | ||
| 1222 | (setq buffer-read-only t)) | ||
| 1219 | (if nomodes | 1223 | (if nomodes |
| 1220 | nil | 1224 | nil |
| 1221 | (and view-read-only view-mode | 1225 | (and view-read-only view-mode |