diff options
| author | Richard M. Stallman <rms@gnu.org> | 1994-07-06 21:41:47 +0000 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 1994-07-06 21:41:47 +0000 |
| commit | 74b9c2afd86677637b905170848ae92cb6c1e943 (patch) | |
| tree | c7be0a82b067e66bfacc146a39df30066708a177 | |
| parent | de7d5e1ba434c5e34615aff591917eaa6c4f345f (diff) | |
| download | emacs-74b9c2afd86677637b905170848ae92cb6c1e943.tar.gz | |
(auto-save-mode): If autosave is off because buffer has
shrunk, then toggling should turn it on.
| -rw-r--r-- | lisp/files.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el index 5ae8af41e82..8982b4fd396 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1949,7 +1949,10 @@ With prefix argument ARG, turn auto-saving on if positive, else off." (interactive "P") (setq buffer-auto-save-file-name (and (if (null arg) - (not buffer-auto-save-file-name) + (or (not buffer-auto-save-file-name) + ;; If autosave is off because buffer has shrunk, + ;; then toggling should turn it on. + (< buffer-saved-size 0)) (or (eq arg t) (listp arg) (and (integerp arg) (> arg 0)))) (if (and buffer-file-name auto-save-visited-file-name (not buffer-read-only)) |
