From: Eli Zaretskii Date: Tue, 19 Nov 2019 15:59:02 +0000 (+0200) Subject: Ensure Rmail summary is updated after editing a message X-Git-Tag: emacs-27.0.90~569 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a76a1d0c0b5c63bbed4eeeb7aa87269621956559;p=emacs.git 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) --- 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.