diff options
| -rw-r--r-- | etc/NEWS | 5 | ||||
| -rw-r--r-- | lisp/mail/rmail.el | 8 |
2 files changed, 13 insertions, 0 deletions
| @@ -1138,6 +1138,11 @@ bindings, will be aborted, and Emacs will not ask you whether to | |||
| 1138 | enlarge 'max-specpdl-size' to complete the rendering. The default is | 1138 | enlarge 'max-specpdl-size' to complete the rendering. The default is |
| 1139 | t, which preserves the original behavior. | 1139 | t, which preserves the original behavior. |
| 1140 | 1140 | ||
| 1141 | --- | ||
| 1142 | *** New user option 'rmail-show-message-set-modified'. | ||
| 1143 | If set non-nil, showing an unseen message will set the Rmail buffer's | ||
| 1144 | modified flag. | ||
| 1145 | |||
| 1141 | ** Apropos | 1146 | ** Apropos |
| 1142 | 1147 | ||
| 1143 | *** New commands 'apropos-next-symbol' and 'apropos-previous-symbol'. | 1148 | *** New commands 'apropos-next-symbol' and 'apropos-previous-symbol'. |
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 29460cc20f5..9f95b62d870 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -2723,6 +2723,12 @@ See also `unrmail-mbox-format'." | |||
| 2723 | :version "24.4" | 2723 | :version "24.4" |
| 2724 | :group 'rmail-files) | 2724 | :group 'rmail-files) |
| 2725 | 2725 | ||
| 2726 | (defcustom rmail-show-message-set-modified nil | ||
| 2727 | "If non-nil, displaying an unseen message marks the Rmail buffer as modified." | ||
| 2728 | :type 'boolean | ||
| 2729 | :group 'rmail | ||
| 2730 | :version "28.1") | ||
| 2731 | |||
| 2726 | (defun rmail-show-message-1 (&optional msg) | 2732 | (defun rmail-show-message-1 (&optional msg) |
| 2727 | "Show message MSG (default: current message) using `rmail-view-buffer'. | 2733 | "Show message MSG (default: current message) using `rmail-view-buffer'. |
| 2728 | Return text to display in the minibuffer if MSG is out of | 2734 | Return text to display in the minibuffer if MSG is out of |
| @@ -2750,6 +2756,8 @@ The current mail message becomes the message displayed." | |||
| 2750 | ;; Mark the message as seen, but preserve buffer modified flag. | 2756 | ;; Mark the message as seen, but preserve buffer modified flag. |
| 2751 | (let ((modiff (buffer-modified-p))) | 2757 | (let ((modiff (buffer-modified-p))) |
| 2752 | (rmail-set-attribute rmail-unseen-attr-index nil) | 2758 | (rmail-set-attribute rmail-unseen-attr-index nil) |
| 2759 | (and rmail-show-message-set-modified | ||
| 2760 | (setq modiff t)) | ||
| 2753 | (unless modiff | 2761 | (unless modiff |
| 2754 | (restore-buffer-modified-p modiff))) | 2762 | (restore-buffer-modified-p modiff))) |
| 2755 | ;; bracket the message in the mail | 2763 | ;; bracket the message in the mail |