summaryrefslogtreecommitdiff
path: root/lisp/gnus/gnus-draft.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus/gnus-draft.el')
-rw-r--r--lisp/gnus/gnus-draft.el16
1 files changed, 12 insertions, 4 deletions
diff --git a/lisp/gnus/gnus-draft.el b/lisp/gnus/gnus-draft.el
index 1709b1c4a05..a2a4cd3e07d 100644
--- a/lisp/gnus/gnus-draft.el
+++ b/lisp/gnus/gnus-draft.el
@@ -325,10 +325,18 @@ If DONT-POP is nil, display the buffer after setting it up."
(error "The draft %s is under edit" file)))))
(defun gnus-draft-clear-marks ()
- (setq gnus-newsgroup-reads nil
- gnus-newsgroup-marked nil
- gnus-newsgroup-unreads
- (gnus-uncompress-range (gnus-active gnus-newsgroup-name))))
+ (setq gnus-newsgroup-marked nil
+ gnus-newsgroup-unreads (gnus-uncompress-range
+ (gnus-active gnus-newsgroup-name)))
+ ;; Mark articles except for deleted ones as unread.
+ (let (rest)
+ (dolist (article gnus-newsgroup-reads)
+ (when (and (consp article)
+ (eq (cdr article) gnus-canceled-mark))
+ (push article rest)
+ (setq gnus-newsgroup-unreads
+ (delq (car article) gnus-newsgroup-unreads))))
+ (setq gnus-newsgroup-reads (nreverse rest))))
(provide 'gnus-draft)