Commit a4f69701 authored by Chong Yidong's avatar Chong Yidong

* 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.
parent 090101cf
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.
......
......@@ -5005,7 +5005,7 @@ With prefix argument ARG, turn auto-saving on if positive, else off."
(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 @@ With prefix argument ARG, turn auto-saving on if positive, else off."
(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)"
......
......@@ -1412,7 +1412,8 @@ If so restore the actual mbox message collection."
(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)
......
......@@ -64,6 +64,10 @@ This function runs the hooks `text-mode-hook' and `rmail-edit-mode-hook'.
(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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment