summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-04-05 03:49:42 +0000
committerRichard M. Stallman <rms@gnu.org>1994-04-05 03:49:42 +0000
commit0b7f1ef2c91ea54611ceb73899ad488b8dddba0b (patch)
tree1b165f3303dd9561611637bc48c524f061f88beb /lisp
parent2788b7c90370275f9e897674c12caa2598bc16c1 (diff)
downloademacs-0b7f1ef2c91ea54611ceb73899ad488b8dddba0b.tar.gz
(auto-save-mode): Don't let buffer-saved-size stay negative.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/files.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 2f886e09dc7..f1989dac173 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -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")))