]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix intermittent rmail-summary-delete-forward problem
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 27 Oct 2020 17:54:41 +0000 (18:54 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 27 Oct 2020 18:29:02 +0000 (19:29 +0100)
* 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

index cc55451902ae62c24113f8c992c14ef1c0a40f57..521659b7eb63a0c06c128041eaaee89b704c4ccf 100644 (file)
@@ -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)