* spam.el: add spam-maybe-spam-stat-load to
authorTeodor Zlatanov <tzz@lifelogs.com>
Thu, 6 Mar 2003 15:58:40 +0000 (15:58 +0000)
committerTeodor Zlatanov <tzz@lifelogs.com>
Thu, 6 Mar 2003 15:58:40 +0000 (15:58 +0000)
gnus-get-top-new-news-hook, remove it from gnus-get-new-news-hook

* gnus-group.el (gnus-group-get-new-news): call the new
gnus-get-top-new-news-hook hook

* gnus-start.el (gnus-get-top-new-news-hook): new hook, run ONLY
by gnus-get-new-news, NOT by gnus-group-get-new-news-this-group

lisp/ChangeLog
lisp/gnus-group.el
lisp/gnus-start.el
lisp/spam.el

index 873a26f..69ce484 100644 (file)
@@ -1,3 +1,14 @@
+2003-03-06  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * spam.el: add spam-maybe-spam-stat-load to
+       gnus-get-top-new-news-hook, remove it from gnus-get-new-news-hook
+
+       * gnus-group.el (gnus-group-get-new-news): call the new
+       gnus-get-top-new-news-hook hook
+
+       * gnus-start.el (gnus-get-top-new-news-hook): new hook, run ONLY
+       by gnus-get-new-news, NOT by gnus-group-get-new-news-this-group
+
 2003-03-06  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * mm-uu.el (mm-uu-pgp-encrypted-test): Fix message.
index cf61197..1a291f6 100644 (file)
@@ -3491,6 +3491,7 @@ re-scanning.  If ARG is non-nil and not a number, this will force
        ;; Binding this variable will inhibit multiple fetchings
        ;; of the same mail source.
        (nnmail-fetched-sources (list t)))
+    (gnus-run-hooks 'gnus-get-top-new-news-hook)
     (gnus-run-hooks 'gnus-get-new-news-hook)
 
     ;; Read any slave files.
index 71b1dae..b212ec4 100644 (file)
@@ -387,6 +387,11 @@ This hook is called as the first thing when Gnus is started."
   :group 'gnus-start
   :type 'hook)
 
+(defcustom gnus-get-top-new-news-hook nil
+  "A hook run just before Gnus checks for new news globally."
+  :group 'gnus-group-new
+  :type 'hook)
+
 (defcustom gnus-get-new-news-hook nil
   "A hook run just before Gnus checks for new news."
   :group 'gnus-group-new
index 8d96d45..4afcb07 100644 (file)
@@ -818,7 +818,7 @@ Uses `gnus-newsgroup-name' if category is nil (for ham registration)."
 
       ;; Add hooks for loading and saving the spam stats
       (add-hook 'gnus-save-newsrc-hook 'spam-maybe-spam-stat-save)
-      (add-hook 'gnus-get-new-news-hook 'spam-maybe-spam-stat-load)
+      (add-hook 'gnus-get-top-new-news-hook 'spam-maybe-spam-stat-load)
       (add-hook 'gnus-startup-hook 'spam-maybe-spam-stat-load))
 
   (file-error (progn