[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r104927: nndraft.el (nndraft-update-u
From: |
Katsumi Yamaoka |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r104927: nndraft.el (nndraft-update-unread-articles): New function. |
Date: |
Mon, 04 Jul 2011 01:14:10 +0000 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 104927
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Mon 2011-07-04 01:14:10 +0000
message:
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 or killing a
draft message.
modified:
lisp/gnus/ChangeLog
lisp/gnus/nndraft.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2011-07-03 22:17:49 +0000
+++ b/lisp/gnus/ChangeLog 2011-07-04 01:14:10 +0000
@@ -1,3 +1,10 @@
+2011-07-04 Katsumi Yamaoka <address@hidden>
+
+ * 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
+ or killing a draft message.
+
2011-07-03 Lars Magne Ingebrigtsen <address@hidden>
* gnus-group.el (gnus-read-ephemeral-bug-group): Bind the coding
=== modified file 'lisp/gnus/nndraft.el'
--- a/lisp/gnus/nndraft.el 2011-01-25 04:08:28 +0000
+++ b/lisp/gnus/nndraft.el 2011-07-04 01:14:10 +0000
@@ -161,6 +161,16 @@
(message-headers-to-generate
nndraft-required-headers message-draft-headers nil))))
+(defun nndraft-update-unread-articles ()
+ "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))))
+
(deffoo nndraft-request-associate-buffer (group)
"Associate the current buffer with some article in the draft group."
(nndraft-open-server "")
@@ -182,6 +192,10 @@
'write-contents-hooks)))
(gnus-make-local-hook hook)
(add-hook hook 'nndraft-generate-headers nil t))
+ (gnus-make-local-hook 'after-save-hook)
+ (add-hook 'after-save-hook 'nndraft-update-unread-articles nil t)
+ (message-add-action '(nndraft-update-unread-articles)
+ 'exit 'postpone 'kill)
article))
(deffoo nndraft-request-group (group &optional server dont-check info)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r104927: nndraft.el (nndraft-update-unread-articles): New function.,
Katsumi Yamaoka <=