* gnus-start.el (gnus-fixup-nnimap-unread-after-getting-new-news): New.
authorSimon Josefsson <jas@extundo.com>
Fri, 27 Sep 2002 08:47:26 +0000 (08:47 +0000)
committerSimon Josefsson <jas@extundo.com>
Fri, 27 Sep 2002 08:47:26 +0000 (08:47 +0000)
(gnus-setup-news-hook): Use it.
(gnus-after-getting-new-news-hook): Ditto.

* nnimap.el (nnimap-fixup-unread-after-getting-new-news): Remove.

lisp/ChangeLog
lisp/gnus-start.el
lisp/nnimap.el

index ba9e2cb..f173cbb 100644 (file)
@@ -1,3 +1,11 @@
+2002-09-27  Simon Josefsson  <jas@extundo.com>
+
+       * 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  <yamaoka@jpl.org>
        From Mats Lidell <matsl@contactor.se>.
 
index bedc58f..37de55c 100644 (file)
@@ -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
index 8f4f9a6..81e150e 100644 (file)
@@ -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))