From a76a1d0c0b5c63bbed4eeeb7aa87269621956559 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 19 Nov 2019 17:59:02 +0200 Subject: [PATCH] Ensure Rmail summary is updated after editing a message * lisp/mail/rmailedit.el (rmail-cease-edit): If this mbox file has a summary, update the summary after editing. (Bug#38193) --- lisp/mail/rmailedit.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el index 01d552469fa..43422ff3a41 100644 --- a/lisp/mail/rmailedit.el +++ b/lisp/mail/rmailedit.el @@ -149,6 +149,7 @@ This function runs the hooks `text-mode-hook' and `rmail-edit-mode-hook'. (declare-function rmail-summary-enable "rmailsum" ()) +(declare-function rmail-summary-update-line "rmailsum" (n)) (defun rmail-cease-edit () "Finish editing message; switch back to Rmail proper." @@ -340,10 +341,11 @@ This function runs the hooks `text-mode-hook' and `rmail-edit-mode-hook'. ;; Delete previous body. This must be after all insertions at the end, ;; so the marker for the beginning of the next message isn't messed up. (delete-region end (point-max))) - (rmail-set-attribute rmail-edited-attr-index t)) -;;;??? BROKEN perhaps. -;;; (if (boundp 'rmail-summary-vector) -;;; (aset rmail-summary-vector (1- rmail-current-message) nil)) + (rmail-set-attribute rmail-edited-attr-index t) + (if (rmail-summary-exists) + (let ((msgnum rmail-current-message)) + (with-current-buffer rmail-summary-buffer + (rmail-summary-update-line msgnum))))) (rmail-show-message) (rmail-toggle-header (if pruned 1 0)) ;; Restore mime display state. -- 2.39.5