From: Simon Josefsson Date: Fri, 27 Sep 2002 08:47:26 +0000 (+0000) Subject: * gnus-start.el (gnus-fixup-nnimap-unread-after-getting-new-news): New. X-Git-Url: http://cgit.sxemacs.org/?a=commitdiff_plain;h=886ed1344e15eec07c9b4519558b3beaf1bcdf32;p=gnus * gnus-start.el (gnus-fixup-nnimap-unread-after-getting-new-news): New. (gnus-setup-news-hook): Use it. (gnus-after-getting-new-news-hook): Ditto. * nnimap.el (nnimap-fixup-unread-after-getting-new-news): Remove. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ba9e2cb30..f173cbb40 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2002-09-27 Simon Josefsson + + * gnus-start.el (gnus-fixup-nnimap-unread-after-getting-new-news): New. + (gnus-setup-news-hook): Use it. + (gnus-after-getting-new-news-hook): Ditto. + + * nnimap.el (nnimap-fixup-unread-after-getting-new-news): Remove. + 2002-09-27 Katsumi Yamaoka From Mats Lidell . diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index bedc58fb7..37de55c12 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -363,7 +363,8 @@ This hook is called as the first thing when Gnus is started." :group 'gnus-start :type 'hook) -(defcustom gnus-setup-news-hook '(nnimap-fixup-unread-after-getting-new-news) +(defcustom gnus-setup-news-hook + '(gnus-fixup-nnimap-unread-after-getting-new-news) "A hook after reading the .newsrc file, but before generating the buffer." :group 'gnus-start :type 'hook) @@ -375,7 +376,7 @@ This hook is called as the first thing when Gnus is started." (defcustom gnus-after-getting-new-news-hook '(gnus-display-time-event-handler - nnimap-fixup-unread-after-getting-new-news) + gnus-fixup-nnimap-unread-after-getting-new-news) "*A hook run after Gnus checks for new news when Gnus is already running." :group 'gnus-group-new :type 'hook) @@ -2759,6 +2760,23 @@ If this variable is nil, don't do anything." (when (gnus-boundp 'display-time-timer) (display-time-event-handler))) +;; Byte-compiler warning. +(eval-when-compile + (defvar nnimap-mailbox-info)) + +;;;###autoload +(defun gnus-fixup-nnimap-unread-after-getting-new-news () + (let (server group info) + (mapatoms + (lambda (sym) + (when (and (setq group (symbol-name sym)) + (gnus-group-entry group) + (setq info (symbol-value sym))) + (gnus-sethash group (cons (nth 2 info) (cdr (gnus-group-entry group))) + gnus-newsrc-hashtb))) + nnimap-mailbox-info))) + + (provide 'gnus-start) ;;; gnus-start.el ends here diff --git a/lisp/nnimap.el b/lisp/nnimap.el index 8f4f9a61b..81e150e30 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -1548,18 +1548,6 @@ be used in a STORE FLAGS command." "Return t iff MARK can be permanently (between IMAP sessions) saved on articles, in GROUP." (imap-message-flag-permanent-p (nnimap-mark-to-flag mark))) -;;;###autoload -(defun nnimap-fixup-unread-after-getting-new-news () - (let (server group info) - (mapatoms - (lambda (sym) - (when (and (setq group (symbol-name sym)) - (gnus-group-entry group) - (setq info (symbol-value sym))) - (gnus-sethash group (cons (nth 2 info) (cdr (gnus-group-entry group))) - gnus-newsrc-hashtb))) - nnimap-mailbox-info))) - (when nnimap-debug (require 'trace) (buffer-disable-undo (get-buffer-create nnimap-debug))