[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master bb652f6: New Rmail option 'rmail-show-message-set-modified'
From: |
Eli Zaretskii |
Subject: |
master bb652f6: New Rmail option 'rmail-show-message-set-modified' |
Date: |
Sat, 30 Jan 2021 04:27:04 -0500 (EST) |
branch: master
commit bb652f68fd4e996d58f731a0dba1be18fd4e03d7
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
New Rmail option 'rmail-show-message-set-modified'
* lisp/mail/rmail.el (rmail-show-message-set-modified): New
option.
(rmail-show-message-1): If 'rmail-show-message-set-modified' is
non-nil, don't reset the buffer's modified state. (Bug#45941)
* etc/NEWS: Announce the new option.
---
etc/NEWS | 5 +++++
lisp/mail/rmail.el | 8 ++++++++
2 files changed, 13 insertions(+)
diff --git a/etc/NEWS b/etc/NEWS
index a6fd51b..11fca4f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1138,6 +1138,11 @@ bindings, will be aborted, and Emacs will not ask you
whether to
enlarge 'max-specpdl-size' to complete the rendering. The default is
t, which preserves the original behavior.
+---
+*** New user option 'rmail-show-message-set-modified'.
+If set non-nil, showing an unseen message will set the Rmail buffer's
+modified flag.
+
** Apropos
*** New commands 'apropos-next-symbol' and 'apropos-previous-symbol'.
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 29460cc..9f95b62 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -2723,6 +2723,12 @@ See also `unrmail-mbox-format'."
:version "24.4"
:group 'rmail-files)
+(defcustom rmail-show-message-set-modified nil
+ "If non-nil, displaying an unseen message marks the Rmail buffer as
modified."
+ :type 'boolean
+ :group 'rmail
+ :version "28.1")
+
(defun rmail-show-message-1 (&optional msg)
"Show message MSG (default: current message) using `rmail-view-buffer'.
Return text to display in the minibuffer if MSG is out of
@@ -2750,6 +2756,8 @@ The current mail message becomes the message displayed."
;; Mark the message as seen, but preserve buffer modified flag.
(let ((modiff (buffer-modified-p)))
(rmail-set-attribute rmail-unseen-attr-index nil)
+ (and rmail-show-message-set-modified
+ (setq modiff t))
(unless modiff
(restore-buffer-modified-p modiff)))
;; bracket the message in the mail
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master bb652f6: New Rmail option 'rmail-show-message-set-modified',
Eli Zaretskii <=