Merge changes made in Gnus trunk.

gnus-registry.el (gnus-registry-fixup-registry): New function to fixup the parameters that can be customized by the user between save/read cycles.
 (gnus-registry-read): Use it.
 (gnus-registry-make-db): Use it.
 (gnus-registry-spool-action, gnus-registry-handle-action): Fix messaging.
 (gnus-registry--split-fancy-with-parent-internal): Fix loop.  Map references to actual group names with sender and subject tracking.
 (gnus-registry-post-process-groups): Use `cond' for better messaging.
 (gnus-registry-usage-test): Add subject lookup test.
registry.el (registry-db, initialize-instance): Set up constructor instead of :initform arguments for the sake of older Emacsen.
 (registry-lookup-breaks-before-lexbind): New method to demonstrate pre-lexbind merge bug.
 (registry-usage-test): Use it.
 (initialize-instance, registry-db): Move the non-function initforms back to the class definition.
registry.el: New library to manage gnus-registry-style data.
gnus-registry.el: Use it (major rewrite).
nnregistry.el: Use it.
spam.el: Use it.
This commit is contained in:
Teodor Zlatanov 2011-04-05 22:35:05 +00:00 committed by Katsumi Yamaoka
parent 41ea9e4837
commit 11a3174d87
4 changed files with 578 additions and 801 deletions

View file

@ -1,3 +1,35 @@
2011-04-05 Teodor Zlatanov <tzz@lifelogs.com>
* gnus-registry.el (gnus-registry-fixup-registry): New function to
fixup the parameters that can be customized by the user between
save/read cycles.
(gnus-registry-read): Use it.
(gnus-registry-make-db): Use it.
(gnus-registry-spool-action, gnus-registry-handle-action): Fix
messaging.
(gnus-registry--split-fancy-with-parent-internal): Fix loop. Map
references to actual group names with sender and subject tracking.
(gnus-registry-post-process-groups): Use `cond' for better messaging.
(gnus-registry-usage-test): Add subject lookup test.
* registry.el (registry-db, initialize-instance): Set up constructor
instead of :initform arguments for the sake of older Emacsen.
(registry-lookup-breaks-before-lexbind): New method to demonstrate
pre-lexbind merge bug.
(registry-usage-test): Use it.
(initialize-instance, registry-db): Move the non-function initforms
back to the class definition.
2011-04-03 Teodor Zlatanov <tzz@lifelogs.com>
* registry.el: New library to manage gnus-registry-style data.
* gnus-registry.el: Use it (major rewrite).
* nnregistry.el: Use it.
* spam.el: Use it.
2011-04-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-sum.el (gnus-update-marks): Reinstate the code to not alter

File diff suppressed because it is too large Load diff

View file

@ -53,7 +53,7 @@
(deffoo nnregistry-request-article (id &optional group server buffer)
(and (not nnregistry-within-nnregistry)
(let* ((nnregistry-within-nnregistry t)
(group (gnus-registry-fetch-group id))
(group (nth 0 (gnus-registry-get-id-key id 'group)))
(gnus-override-method nil))
(message "nnregistry: requesting article `%s' in group `%s'"
id group)

View file

@ -68,9 +68,9 @@
;; autoload gnus-registry
(autoload 'gnus-registry-group-count "gnus-registry")
(autoload 'gnus-registry-add-group "gnus-registry")
(autoload 'gnus-registry-store-extra-entry "gnus-registry")
(autoload 'gnus-registry-fetch-extra "gnus-registry")
(autoload 'gnus-registry-get-id-key "gnus-registry")
(autoload 'gnus-registry-set-id-key "gnus-registry")
(autoload 'gnus-registry-handle-action "gnus-registry")
;; autoload dns-query
(autoload 'dns-query "dns")
@ -1764,8 +1764,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
(when (and id split-return spam-log-to-registry)
(when (zerop (gnus-registry-group-count id))
(gnus-registry-add-group
id group subject sender))
(gnus-registry-handle-action id nil group subject sender))
(unless registry-lookup
(spam-log-processing-to-registry
@ -1894,13 +1893,10 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
(spam-process-type-valid-p type)
(spam-classification-valid-p classification)
(spam-backend-valid-p backend))
(let ((cell-list (cdr-safe (gnus-registry-fetch-extra id type)))
(let ((cell-list (gnus-registry-get-id-key id type))
(cell (list classification backend group)))
(push cell cell-list)
(gnus-registry-store-extra-entry
id
type
cell-list))
(gnus-registry-set-id-key id type cell-list))
(gnus-error
7
@ -1913,7 +1909,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
(when spam-log-to-registry
(if (and (stringp id)
(spam-process-type-valid-p type))
(cdr-safe (gnus-registry-fetch-extra id type))
(gnus-registry-get-id-key id type)
(progn
(gnus-error
7
@ -1945,7 +1941,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
(spam-process-type-valid-p type)
(spam-classification-valid-p classification)
(spam-backend-valid-p backend))
(let ((cell-list (cdr-safe (gnus-registry-fetch-extra id type)))
(let ((cell-list (gnus-registry-get-id-key id type))
found)
(dolist (cell cell-list)
(unless found
@ -1970,16 +1966,13 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
(spam-process-type-valid-p type)
(spam-classification-valid-p classification)
(spam-backend-valid-p backend))
(let ((cell-list (cdr-safe (gnus-registry-fetch-extra id type)))
(let ((cell-list (gnus-registry-get-id-key id type))
new-cell-list found)
(dolist (cell cell-list)
(unless (and (eq classification (nth 0 cell))
(eq backend (nth 1 cell)))
(push cell new-cell-list)))
(gnus-registry-store-extra-entry
id
type
new-cell-list))
(gnus-registry-set-id-key id type new-cell-list))
(progn
(gnus-error 7 (format
"%s call with bad ID, type, spam-backend, or group"