(gnus-registry-clean-empty-function)
authorTeodor Zlatanov <tzz@lifelogs.com>
Tue, 13 Apr 2004 15:11:35 +0000 (15:11 +0000)
committerTeodor Zlatanov <tzz@lifelogs.com>
Tue, 13 Apr 2004 15:11:35 +0000 (15:11 +0000)
(gnus-registry-clean-empty): remove only empty entries without
extra data

lisp/ChangeLog
lisp/gnus-registry.el

index b900469..7e8f135 100644 (file)
@@ -1,3 +1,9 @@
+2004-04-13  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * gnus-registry.el (gnus-registry-clean-empty-function)
+       (gnus-registry-clean-empty): remove only empty entries without
+       extra data
+
 2004-04-12  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * spam-stat.el (spam-stat-buffer-change-to-spam)
index 30060b4..3fa2c88 100644 (file)
@@ -84,7 +84,8 @@ The group names are matched, they don't have to be fully qualified."
 
 (defcustom gnus-registry-clean-empty t
   "Whether the empty registry entries should be deleted.
-Registry entries are considered empty when they have no groups."
+Registry entries are considered empty when they have no groups
+and no extra data."
   :group 'gnus-registry
   :type 'boolean)
 
@@ -248,7 +249,11 @@ way."
   (let ((count 0))
     (maphash
      (lambda (key value)
-       (unless (gnus-registry-fetch-group key)
+       (unless (or
+               (gnus-registry-fetch-group key)
+               ;; TODO: look for specific extra data here!
+               ;; in this example, we look for 'label
+               (gnus-registry-fetch-extra key 'label)) 
         (incf count)
         (remhash key gnus-registry-hashtb)))
      gnus-registry-hashtb)