(spam-summary-prepare-exit): only produce "marking spam
[gnus] / lisp / spam.el
index f3d0c11..7577a71 100644 (file)
@@ -869,8 +869,11 @@ Will not return a nil score."
 
     ;; now we redo spam-mark-spam-as-expired-and-move-routine to only
     ;; expire spam, in case the above did not expire them
-    (gnus-message 6 "Marking spam as expired without moving it")
-    (spam-mark-spam-as-expired-and-move-routine nil)
+    (when (< 0 (spam-list-articles
+               gnus-newsgroup-articles
+               'spam))
+      (gnus-message 6 "Marking spam as expired without moving it")
+      (spam-mark-spam-as-expired-and-move-routine nil))
 
     (when (or (spam-group-ham-contents-p gnus-newsgroup-name)
              (and (spam-group-spam-contents-p gnus-newsgroup-name)