From: Richard M. Stallman Date: Thu, 16 Jul 2009 01:52:32 +0000 (+0000) Subject: * files.el (auto-save-mode): If buffer-saved-size is -2, don't clobber it. X-Git-Tag: emacs-pretest-23.1.90~2156 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7a907299a2cce789fadaf7c97ead215970ca7b82;p=emacs.git * files.el (auto-save-mode): If buffer-saved-size is -2, don't clobber it. * mail/rmail.el (rmail-variables): Set buffer-saved-size to -2. (rmail-retry-ignored-headers): Add more uninteresting fields. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f639b1af8fa..8cafbe09329 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2009-07-16 Richard Stallman + + * files.el (auto-save-mode): If buffer-saved-size is -2, + don't clobber it. + + * mail/rmail.el (rmail-variables): Set buffer-saved-size to -2. + (rmail-retry-ignored-headers): Add more uninteresting fields. + 2009-07-15 Jari Aalto * net/rcirc.el (rcirc): Use history variables. diff --git a/lisp/files.el b/lisp/files.el index 10970aa7d78..0c4edf63363 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -4996,7 +4996,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 0) + (and (= buffer-saved-size -1) (setq buffer-saved-size 0)) (if (interactive-p) (message "Auto-save %s (in this buffer)" diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index b348495f178..ac7cbc043c4 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -371,7 +371,7 @@ If nil, display all header fields except those matched by :group 'rmail-headers) ;;;###autoload -(defcustom rmail-retry-ignored-headers "^x-authentication-warning:\\|content-type:\\|content-transfer-encoding:\\|mime-version:" +(defcustom rmail-retry-ignored-headers "^x-authentication-warning:\\|^x-detected-operating-system:\\|^x-spam[-a-z]*:\\|content-type:\\|content-transfer-encoding:\\|mime-version:" "Headers that should be stripped when retrying a failed message." :type '(choice regexp (const nil :tag "None")) :group 'rmail-headers @@ -1410,6 +1410,9 @@ If so restore the actual mbox message collection." ;; Don't let a local variables list in a message cause confusion. (make-local-variable 'local-enable-local-variables) (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 'revert-buffer-function) (setq revert-buffer-function 'rmail-revert) (make-local-variable 'font-lock-defaults)