diff options
| author | Richard M. Stallman | 1993-06-10 23:35:18 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-06-10 23:35:18 +0000 |
| commit | fec33c0b30d9325b1ce98d1f307d6a52f50c3cfb (patch) | |
| tree | da5efb0c5f3729fd034dd014abca36b514074bee | |
| parent | 23efee2ce4312712365f914a5ba72e4c410e4137 (diff) | |
| download | emacs-fec33c0b30d9325b1ce98d1f307d6a52f50c3cfb.tar.gz emacs-fec33c0b30d9325b1ce98d1f307d6a52f50c3cfb.zip | |
(basic-save-buffer): Cal auto-save-mode with t as arg
if and only if auto save was off and default is on.
(set-visited-file-name): Likewise.
| -rw-r--r-- | lisp/files.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/files.el b/lisp/files.el index 047bea3c2df..9cce40b6017 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -1086,7 +1086,8 @@ if you wish to pass an empty string as the argument." | |||
| 1086 | (setq backup-inhibited t))) | 1086 | (setq backup-inhibited t))) |
| 1087 | ;; If auto-save was not already on, turn it on if appropriate. | 1087 | ;; If auto-save was not already on, turn it on if appropriate. |
| 1088 | (if (not buffer-auto-save-file-name) | 1088 | (if (not buffer-auto-save-file-name) |
| 1089 | (auto-save-mode (and buffer-file-name auto-save-default)) | 1089 | (and buffer-file-name auto-save-default |
| 1090 | (auto-save-mode t)) | ||
| 1090 | ;; If auto save is on, start using a new name. | 1091 | ;; If auto save is on, start using a new name. |
| 1091 | ;; We deliberately don't rename or delete the old auto save | 1092 | ;; We deliberately don't rename or delete the old auto save |
| 1092 | ;; for the old visited file name. This is because perhaps | 1093 | ;; for the old visited file name. This is because perhaps |
| @@ -1381,7 +1382,8 @@ the last real save, but optional arg FORCE non-nil means delete anyway." | |||
| 1381 | (setq buffer-file-name | 1382 | (setq buffer-file-name |
| 1382 | (expand-file-name (read-file-name "File to save in: ") nil) | 1383 | (expand-file-name (read-file-name "File to save in: ") nil) |
| 1383 | default-directory (file-name-directory buffer-file-name)) | 1384 | default-directory (file-name-directory buffer-file-name)) |
| 1384 | (auto-save-mode auto-save-default))) | 1385 | (and auto-save-default (not buffer-auto-save-file-name) |
| 1386 | (auto-save-mode t)))) | ||
| 1385 | (or (verify-visited-file-modtime (current-buffer)) | 1387 | (or (verify-visited-file-modtime (current-buffer)) |
| 1386 | (not (file-exists-p buffer-file-name)) | 1388 | (not (file-exists-p buffer-file-name)) |
| 1387 | (yes-or-no-p | 1389 | (yes-or-no-p |