summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2021-01-29 08:34:43 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2021-01-30 06:58:49 +0100
commit90ce2b80342299ef4c6c2f6b08cca55e20ffa06b (patch)
tree6418dca7abc1835b59e6e40c688bf67a88dd376f
parentbbad7904e20ba0366a3397a45fb89de0275bbf28 (diff)
downloademacs-90ce2b80342299ef4c6c2f6b08cca55e20ffa06b.tar.gz
rmail-summary-mark-deleted optional argument fix
* lisp/mail/rmailsum.el (rmail-summary-mark-deleted): Argument N is optional, so don't assume that it's a number (bug#39076).
-rw-r--r--lisp/mail/rmailsum.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index d29115a9570..7f99ecdcf2c 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -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)