changeset 104016:e59e70025fe8

* mail/rmailedit.el (rmail-edit-mode): Use auto-save-include-big-deletions. * mail/rmail.el (rmail-variables): Use auto-save-include-big-deletions. * files.el (auto-save-mode): Revert 2009-07-21 and 2009-07-16 changes.
author Chong Yidong <cyd@stupidchicken.com>
date Tue, 21 Jul 2009 23:34:33 +0000
parents 65ac865116fc
children 650fcc9f557b
files lisp/ChangeLog lisp/files.el lisp/mail/rmail.el lisp/mail/rmailedit.el
diffstat 4 files changed, 19 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Jul 21 23:34:02 2009 +0000
+++ b/lisp/ChangeLog	Tue Jul 21 23:34:33 2009 +0000
@@ -1,3 +1,14 @@
+2009-07-21  Chong Yidong  <cyd@stupidchicken.com>
+
+	* mail/rmailedit.el (rmail-edit-mode): Use
+	auto-save-include-big-deletions.
+
+	* mail/rmail.el (rmail-variables): Use
+	auto-save-include-big-deletions.
+
+	* files.el (auto-save-mode): Revert 2009-07-21 and 2009-07-16
+	changes.
+
 2009-07-21  Jay Belanger  <jay.p.belanger@gmail.com>
 
 	* calc/calc.el (calc-undo-length): New variable.
--- a/lisp/files.el	Tue Jul 21 23:34:02 2009 +0000
+++ b/lisp/files.el	Tue Jul 21 23:34:33 2009 +0000
@@ -5005,7 +5005,7 @@
 		 (or (not buffer-auto-save-file-name)
 		     ;; If auto-save is off because buffer has shrunk,
 		     ;; then toggling should turn it on.
-		     (= buffer-saved-size -1))
+		     (< 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))
@@ -5013,7 +5013,7 @@
 	       (make-auto-save-file-name))))
   ;; If -1 was stored here, to temporarily turn off saving,
   ;; turn it back on.
-  (and (= buffer-saved-size -1)
+  (and (< buffer-saved-size 0)
        (setq buffer-saved-size 0))
   (if (interactive-p)
       (message "Auto-save %s (in this buffer)"
--- a/lisp/mail/rmail.el	Tue Jul 21 23:34:02 2009 +0000
+++ b/lisp/mail/rmail.el	Tue Jul 21 23:34:33 2009 +0000
@@ -1412,7 +1412,8 @@
   (setq local-enable-local-variables nil)
   ;; Don't turn off auto-saving based on the size of the buffer
   ;; because that code does not understand buffer-swapping.
-  (setq buffer-saved-size -2)
+  (make-local-variable 'auto-save-include-big-deletions)
+  (setq auto-save-include-big-deletions t)
   (make-local-variable 'revert-buffer-function)
   (setq revert-buffer-function 'rmail-revert)
   (make-local-variable 'font-lock-defaults)
--- a/lisp/mail/rmailedit.el	Tue Jul 21 23:34:02 2009 +0000
+++ b/lisp/mail/rmailedit.el	Tue Jul 21 23:34:33 2009 +0000
@@ -64,6 +64,10 @@
     (if (boundp 'mode-line-modified)
 	(setq mode-line-modified (default-value 'mode-line-modified))
       (setq mode-line-format (default-value 'mode-line-format)))
+    ;; Don't turn off auto-saving based on the size of the buffer
+    ;; because that code does not understand buffer-swapping.
+    (make-local-variable 'auto-save-include-big-deletions)
+    (setq auto-save-include-big-deletions t)
     ;; If someone uses C-x C-s, don't clobber the rmail file (bug#2625).
     (add-hook 'write-region-annotate-functions
 	      'rmail-write-region-annotate nil t)