* 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 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.
(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))
(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)"
(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)
(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)