From: Richard M. Stallman Date: Wed, 6 Jul 1994 21:41:47 +0000 (+0000) Subject: (auto-save-mode): If autosave is off because buffer has X-Git-Tag: emacs-19.34~7695 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=74b9c2afd86677637b905170848ae92cb6c1e943;p=emacs.git (auto-save-mode): If autosave is off because buffer has shrunk, then toggling should turn it on. --- 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))