From: Katsumi Yamaoka Date: Fri, 1 Jul 2011 04:08:50 +0000 (+0000) Subject: gnus-draft.el (gnus-draft-clear-marks): Mark deleted articles as read. X-Git-Tag: emacs-pretest-24.0.90~104^2~152^2~287^2~1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fb81de5fb57e946c936cce4f2f3753255bc2e8da;p=emacs.git gnus-draft.el (gnus-draft-clear-marks): Mark deleted articles as read. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 50082d6039b..26740da73df 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,7 @@ +2011-07-01 Katsumi Yamaoka + + * gnus-draft.el (gnus-draft-clear-marks): Mark deleted articles as read. + 2011-07-01 Daiki Ueno * plstore.el (plstore-select-keys, plstore-encrypt-to): New variable. 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)