From: Richard M. Stallman Date: Thu, 23 Jun 2011 16:38:40 +0000 (-0400) Subject: Marking message as "seen" should not mark buffer as changed. X-Git-Tag: emacs-pretest-24.0.90~104^2~152^2~423 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f444564c73d7c7546d60d2d899a02cf838316c6c;p=emacs.git Marking message as "seen" should not mark buffer as changed. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1a64321c5f5..6b5f33a7782 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,7 @@ 2011-06-23 Richard Stallman * mail/rmail.el (rmail-retry-ignored-headers): Add message-id. + (rmail-show-message-1): Preserve buffer modified flag. 2011-06-23 Michael Albinus diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index a65c8376642..33f87d634a3 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -2669,8 +2669,11 @@ The current mail message becomes the message displayed." (t (setq rmail-current-message msg))) (with-current-buffer rmail-buffer (setq header-style rmail-header-style) - ;; Mark the message as seen - (rmail-set-attribute rmail-unseen-attr-index nil) + ;; Mark the message as seen, but preserve buffer modified flag. + (let ((modiff (buffer-modified-p))) + (rmail-set-attribute rmail-unseen-attr-index nil) + (unless modiff + (set-buffer-modified-p nil))) ;; bracket the message in the mail ;; buffer and determine the coding system the transfer encoding. (rmail-swap-buffers-maybe)