[gnus git] branch master updated: n0-17-125-gb28d326 =1= gnus-draft.el (gnus-draft-clear-marks): Mark deleted articles as read.

Katsumi Yamaoka <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  b28d3268af979b7dbc15318793330085996c53a3 (commit)
      from  eb77f7d94997f68ccd0b3e73d71782221f269aa8 (commit)


- Log -----------------------------------------------------------------
commit b28d3268af979b7dbc15318793330085996c53a3
Author: Katsumi Yamaoka <[email protected]>
Date:   Fri Jul 1 04:06:35 2011 +0000

    gnus-draft.el (gnus-draft-clear-marks): Mark deleted articles as read.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2aba7e4..f11e342 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2011-07-01  Katsumi Yamaoka  <[email protected]>
+
+	* gnus-draft.el (gnus-draft-clear-marks): Mark deleted articles as read.
+
 2011-07-01  Daiki Ueno  <[email protected]>
 
 	* plstore.el (plstore-select-keys, plstore-encrypt-to): New variable.
diff --git a/lisp/gnus-draft.el b/lisp/gnus-draft.el
index 1709b1c..a2a4cd3 100644
--- a/lisp/gnus-draft.el
+++ b/lisp/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)
 

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog     |    4 ++++
 lisp/gnus-draft.el |   16 ++++++++++++----
 2 files changed, 16 insertions(+), 4 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.