emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r104473: gnus-registry.el (gnus-regis


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104473: gnus-registry.el (gnus-registry-remove-ignored): New function to remove entries with groups we ignore.
Date: Wed, 01 Jun 2011 22:35:26 +0000
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104473
author: Teodor Zlatanov <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Wed 2011-06-01 22:35:26 +0000
message:
  gnus-registry.el (gnus-registry-remove-ignored): New function to remove 
entries with groups we ignore.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/gnus-registry.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2011-06-01 00:22:55 +0000
+++ b/lisp/gnus/ChangeLog       2011-06-01 22:35:26 +0000
@@ -1,3 +1,8 @@
+2011-06-01  Teodor Zlatanov  <address@hidden>
+
+       * gnus-registry.el (gnus-registry-remove-ignored): New function to
+       remove entries with groups we ignore.
+
 2011-05-31  Lars Magne Ingebrigtsen  <address@hidden>
 
        * shr.el (shr-rescale-image): Add an :ascent of 100 to images so that

=== modified file 'lisp/gnus/gnus-registry.el'
--- a/lisp/gnus/gnus-registry.el        2011-05-31 22:08:51 +0000
+++ b/lisp/gnus/gnus-registry.el        2011-06-01 22:35:26 +0000
@@ -321,6 +321,20 @@
     (gnus-message 5 "Saving Gnus registry (size %d) to %s...done"
                   (registry-size db) file)))
 
+(defun gnus-registry-remove-ignored ()
+  (interactive)
+  (let* ((db gnus-registry-db)
+         (grouphashtb (registry-lookup-secondary db 'group))
+         (old-size (registry-size db)))
+    (registry-reindex db)
+    (loop for k being the hash-keys of grouphashtb
+          using (hash-values v)
+          when (gnus-registry-ignore-group-p k)
+          do (registry-delete db v nil))
+    (registry-reindex db)
+    (gnus-message 4 "Removed %d ignored entries from the Gnus registry"
+                  (- old-size (registry-size db)))))
+
 ;; article move/copy/spool/delete actions
 (defun gnus-registry-action (action data-header from &optional to method)
   (let* ((id (mail-header-id data-header))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]