]> git.eshelyaron.com Git - emacs.git/commitdiff
(auto-save-mode): Don't let buffer-saved-size stay negative.
authorRichard M. Stallman <rms@gnu.org>
Tue, 5 Apr 1994 03:49:42 +0000 (03:49 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 5 Apr 1994 03:49:42 +0000 (03:49 +0000)
lisp/files.el

index 2f886e09dc76909dc43e5ae1e796772d8bbd01d6..f1989dac173a4c523476e9abc4680e5fe9024b21 100644 (file)
@@ -1884,6 +1884,10 @@ With prefix argument ARG, turn auto-saving on if positive, else off."
                      (not buffer-read-only))
                 buffer-file-name
               (make-auto-save-file-name))))
+  ;; If -1 was stored here, to temporarily turn off saving,
+  ;; turn it back on.
+  (and (< buffer-saved-size 0)
+       (setq buffer-saved-size 0))
   (if (interactive-p)
       (message "Auto-save %s (in this buffer)"
               (if buffer-auto-save-file-name "on" "off")))