]> git.eshelyaron.com Git - emacs.git/commit
Fix Gnus registry pruning and sorting, and rename file
authorEric Abrahamsen <eric@ericabrahamsen.net>
Thu, 18 Dec 2014 11:22:02 +0000 (11:22 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 18 Dec 2014 11:22:02 +0000 (11:22 +0000)
commitd20acfe06340953dce443795d28ac224a2223414
tree1bc3a7ea61c8f9d07b0b38efee915530d0617329
parent18d4bdf135524f33173caa2ef2164345bd09017d
Fix Gnus registry pruning and sorting, and rename file

* lisp/gnus/gnus-registry.el (gnus-registry-prune-factor): Add new variable.
(gnus-registry-max-pruned-entries): Remove obsolete variable.
(gnus-registry-cache-file): Change default
filename extension to "eieio".
(gnus-registry-read): Add new function, split out from
`gnus-registry-load', that does the actual object reading.
(gnus-registry-load): Use it. Add condition case handler to check for
old filename extension and rename to the new one.
(gnus-registry-default-sort-function): New variable to specify a sort
function to use when pruning.
(gnus-registry-save, gnus-registry-insert): Use it.
(gnus-registry-sort-by-creation-time): Define a default sort function.

* lisp/gnus/registry.el (registry-db): Consolidate the :max-hard and
:max-soft slots into a :max-size slot.
(registry-db-version): Add new variable for database version number.
(registry-prune): Use :max-size slot. Accept and use a sort-function
argument.
(registry-collect-prune-candidates): Add new function for finding
non-precious pruning candidates.
(registry-prune-hard-candidates, registry-prune-soft-candidates):
Remove obsolete functions.
(initialize-instance): Upgrade registry version when starting.

* doc/misc/gnus.texi (Gnus Registry Setup): Explain pruning changes.
Mention gnus-registry-prune-factor. Explain sorting changes and
gnus-registry-default-sort-function. Correct file extension.
doc/misc/ChangeLog
doc/misc/gnus.texi
lisp/gnus/ChangeLog
lisp/gnus/gnus-registry.el
lisp/gnus/registry.el