]> code.delx.au - gnu-emacs/blobdiff - lisp/gnus/gnus-registry.el
lisp/startup.el (argi): Declare as global variable (bug#9275).
[gnu-emacs] / lisp / gnus / gnus-registry.el
index f6c0daaaa93f26e5de016f6975e2d72777517194..f8ff52f128ff7606baf1dc124aa715dcf96c11e2 100644 (file)
@@ -321,6 +321,20 @@ This is not required after changing `gnus-registry-cache-file'."
     (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))
@@ -900,6 +914,9 @@ Uses `gnus-registry-marks' to find what shortcuts to install."
 (make-obsolete 'gnus-registry-user-format-function-M
                'gnus-registry-article-marks-to-chars "24.1") ?
 
+(defalias 'gnus-registry-user-format-function-M
+  'gnus-registry-article-marks-to-chars)
+
 ;; use like this:
 ;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-chars)
 (defun gnus-registry-article-marks-to-chars (headers)