]> git.eshelyaron.com Git - emacs.git/commitdiff
rmail-summary-mark-deleted optional argument fix
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 29 Jan 2021 07:34:43 +0000 (08:34 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 30 Jan 2021 05:58:49 +0000 (06:58 +0100)
* lisp/mail/rmailsum.el (rmail-summary-mark-deleted): Argument N
is optional, so don't assume that it's a number (bug#39076).

lisp/mail/rmailsum.el

index d29115a95701d4ea0c9e0f5f26f650ab9f45f8da..7f99ecdcf2c60220c5f20730fd6efe432e9c29ef 100644 (file)
@@ -974,8 +974,9 @@ a negative argument means to delete and move forward."
          (delete-char 1)
          (insert "D"))
        ;; Discard cached new summary line.
-       (with-current-buffer rmail-buffer
-         (aset rmail-summary-vector (1- n) nil))))
+        (when n
+         (with-current-buffer rmail-buffer
+           (aset rmail-summary-vector (1- n) nil)))))
   (beginning-of-line))
 
 (defun rmail-summary-update-line (n)