emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master a76a1d0: Ensure Rmail summary is updated after editing a message


From: Eli Zaretskii
Subject: master a76a1d0: Ensure Rmail summary is updated after editing a message
Date: Tue, 19 Nov 2019 10:59:45 -0500 (EST)

branch: master
commit a76a1d0c0b5c63bbed4eeeb7aa87269621956559
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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 01d5524..43422ff 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]