From 15a67102dd9581b6c53eb2e168c1387e9b2ba796 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 27 Oct 2020 18:54:41 +0100 Subject: [PATCH] Fix intermittent rmail-summary-delete-forward problem * lisp/mail/rmailsum.el (rmail-summary-delete-forward): `rmail-delete-message' may apparently clear `rmail-current-message' sometimes, so save the message number before deleting (bug#39612). --- lisp/mail/rmailsum.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index cc55451902a..521659b7eb6 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -931,8 +931,8 @@ a negative argument means to delete and move backward." (not (and backward (bobp)))) (rmail-summary-goto-msg) (with-current-buffer rmail-buffer - (rmail-delete-message) - (setq del-msg rmail-current-message)) + (setq del-msg rmail-current-message) + (rmail-delete-message)) (rmail-summary-mark-deleted del-msg) (while (and (not (if backward (bobp) (eobp))) (save-excursion (beginning-of-line) -- 2.39.2