]> code.delx.au - gnu-emacs/commitdiff
Marking message as "seen" should not mark buffer as changed.
authorRichard M. Stallman <rms@gnu.org>
Thu, 23 Jun 2011 16:38:40 +0000 (12:38 -0400)
committerRichard M. Stallman <rms@gnu.org>
Thu, 23 Jun 2011 16:38:40 +0000 (12:38 -0400)
lisp/ChangeLog
lisp/mail/rmail.el

index 1a64321c5f5859ae745e55d5ddc904a4f05c8162..6b5f33a778201523560adba5c75bffb34ab84deb 100644 (file)
@@ -1,6 +1,7 @@
 2011-06-23  Richard Stallman  <rms@gnu.org>
 
        * mail/rmail.el (rmail-retry-ignored-headers): Add message-id.
+       (rmail-show-message-1): Preserve buffer modified flag.
 
 2011-06-23  Michael Albinus  <michael.albinus@gmx.de>
 
index a65c8376642b897e1dded0414662539ad8547da4..33f87d634a3326c333fe8d83bffc5ae778c9f35b 100644 (file)
@@ -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)