* gnus-registry.el (gnus-registry-unregistered-group-regex): new variable
authorTeodor Zlatanov <tzz@lifelogs.com>
Thu, 1 May 2003 15:46:54 +0000 (15:46 +0000)
committerTeodor Zlatanov <tzz@lifelogs.com>
Thu, 1 May 2003 15:46:54 +0000 (15:46 +0000)
(gnus-registry-register-message-ids): use it

lisp/ChangeLog
lisp/gnus-registry.el

index 7d2ea70..13f9046 100644 (file)
@@ -1,3 +1,8 @@
+2003-05-01  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * gnus-registry.el (gnus-registry-unregistered-group-regex): new variable
+       (gnus-registry-register-message-ids): use it
+
 2003-05-01  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * gnus.el (gnus-version-number): Bump.
        Take care of some differences between XEmacs 21.1 and newer
        versions of XEmacs.
 
-2003-04-30  Teodor Zlatanov  <tzz@bwh.harvard.edu>
+2003-04-30  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * gnus-registry.el (gnus-registry-split-fancy-with-parent): added
        diagnostic message
index 7d80120..324155d 100644 (file)
@@ -49,6 +49,11 @@ The group names are matched, they don't have to be fully qualified."
   :group 'gnus-registry
   :type '(repeat string))
 
+(defcustom gnus-registry-unregistered-group-regex "^nntp"
+  "Group name regex that gnus-registry-register-message-ids won't process."
+  :group 'gnus-registry
+  :type 'regexp)
+
 ;; Function(s) missing in Emacs 20
 (when (memq nil (mapcar 'fboundp '(puthash)))
   (require 'cl)
@@ -151,13 +156,15 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
 
 (defun gnus-registry-register-message-ids ()
   "Register the Message-ID of every article in the group"
-  (dolist (article gnus-newsgroup-articles)
-    (let ((id (gnus-registry-fetch-message-id-fast article)))
-      (unless (gnus-registry-fetch-group id)
-       (gnus-message 9 "Registry: Registering article %d with group %s" 
-                     article gnus-newsgroup-name)
-       (gnus-registry-add-group (gnus-registry-fetch-message-id-fast article)
-                                gnus-newsgroup-name)))))
+  (unless (and gnus-registry-unregistered-group-regex
+              (string-match gnus-registry-unregistered-group-regex gnus-newsgroup-name))
+    (dolist (article gnus-newsgroup-articles)
+      (let ((id (gnus-registry-fetch-message-id-fast article)))
+       (unless (gnus-registry-fetch-group id)
+         (gnus-message 9 "Registry: Registering article %d with group %s" 
+                       article gnus-newsgroup-name)
+         (gnus-registry-add-group (gnus-registry-fetch-message-id-fast article)
+                                  gnus-newsgroup-name))))))
 
 (defun gnus-registry-fetch-message-id-fast (article)
   "Fetch the Message-ID quickly, using the internal gnus-data-list function"