aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/gnus
diff options
context:
space:
mode:
authorKatsumi Yamaoka <[email protected]>2011-07-04 02:19:08 +0000
committerKatsumi Yamaoka <[email protected]>2011-07-04 02:19:08 +0000
commitbb9e218d460321560ef2841085bf88349f58009c (patch)
treee475991e68605b2aede66bfdfb24d0f1c4100f30 /lisp/gnus
parent7d47b580380358da3353e4f379f2313ec3411af1 (diff)
nndraft.el (nndraft-update-unread-articles): Don't show group having no unread article unless it matches gnus-permanently-visible-groups.
Diffstat (limited to 'lisp/gnus')
-rw-r--r--lisp/gnus/ChangeLog3
-rw-r--r--lisp/gnus/nndraft.el19
2 files changed, 17 insertions, 5 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 45c051c691..d621333f28 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,5 +1,8 @@
2011-07-04 Katsumi Yamaoka <[email protected]>
+ * nndraft.el (nndraft-update-unread-articles): Don't show group having
+ no unread article unless it matches gnus-permanently-visible-groups.
+
* nndraft.el (nndraft-update-unread-articles): New function.
(nndraft-request-associate-buffer): Use it to update the number of
unread articles for the nndraft groups in the group buffer when saving
diff --git a/lisp/gnus/nndraft.el b/lisp/gnus/nndraft.el
index 5275468bb6..459778bf4b 100644
--- a/lisp/gnus/nndraft.el
+++ b/lisp/gnus/nndraft.el
@@ -165,11 +165,20 @@ are generated if and only if they are also in `message-draft-headers'.")
"Update groups' unread articles in the group buffer."
(nndraft-request-list)
(with-current-buffer gnus-group-buffer
- (let ((gnus-group-marked
- (mapcar (lambda (elem)
- (gnus-group-prefixed-name (car elem) (list 'nndraft "")))
- (nnmail-get-active))))
- (gnus-group-get-new-news-this-group nil t))))
+ (let* ((groups (mapcar (lambda (elem)
+ (gnus-group-prefixed-name (car elem)
+ (list 'nndraft "")))
+ (nnmail-get-active)))
+ (gnus-group-marked (copy-sequence groups))
+ (inhibit-read-only t))
+ (gnus-group-get-new-news-this-group nil t)
+ (dolist (group groups)
+ (unless (and gnus-permanently-visible-groups
+ (string-match gnus-permanently-visible-groups
+ group))
+ (gnus-group-goto-group group)
+ (when (zerop (gnus-group-group-unread))
+ (gnus-delete-line)))))))
(deffoo nndraft-request-associate-buffer (group)
"Associate the current buffer with some article in the draft group."