summaryrefslogtreecommitdiff
path: root/lisp/gnus/nndraft.el
diff options
context:
space:
mode:
authorKatsumi Yamaoka <yamaoka@jpl.org>2011-07-04 02:19:08 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2011-07-04 02:19:08 +0000
commitbb9e218d460321560ef2841085bf88349f58009c (patch)
treee475991e68605b2aede66bfdfb24d0f1c4100f30 /lisp/gnus/nndraft.el
parent7d47b580380358da3353e4f379f2313ec3411af1 (diff)
downloademacs-bb9e218d460321560ef2841085bf88349f58009c.tar.gz
emacs-bb9e218d460321560ef2841085bf88349f58009c.tar.bz2
emacs-bb9e218d460321560ef2841085bf88349f58009c.zip
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/nndraft.el')
-rw-r--r--lisp/gnus/nndraft.el19
1 files changed, 14 insertions, 5 deletions
diff --git a/lisp/gnus/nndraft.el b/lisp/gnus/nndraft.el
index 5275468bb6f..459778bf4b3 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."