From: yamaoka Date: Mon, 8 Sep 2003 22:09:04 +0000 (+0000) Subject: Synch to Gnus 200309081825. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=3ba67672dc241bd06a68cb4f1fce30f1ce9932c8;p=elisp%2Fgnus.git- Synch to Gnus 200309081825. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f92e4f8..3ea365c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2003-09-08 Teodor Zlatanov + + * gnus-registry.el (gnus-registry-delete-id): function to + completely delete an ID, including all the cache hashtables + (gnus-registry-delete-group): use gnus-registry-delete-id + (gnus-registry-simplify-subject): only run if the argument is a + string, return nil otherwise + 2003-09-07 Jesper Harder * gnus-msg.el (gnus-summary-resend-bounced-mail): Docstring fix. diff --git a/lisp/gnus-registry.el b/lisp/gnus-registry.el index cb48b89..8160c81 100644 --- a/lisp/gnus-registry.el +++ b/lisp/gnus-registry.el @@ -413,9 +413,9 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." nil)) (defun gnus-registry-simplify-subject (subject) - (if (null subject) - nil - (gnus-simplify-subject subject))) + (if (stringp subject) + (gnus-simplify-subject subject) + nil)) (defun gnus-registry-fetch-simplified-message-subject-fast (article) "Fetch the Subject quickly, using the internal gnus-data-list function" @@ -522,9 +522,19 @@ Returns the first place where the trail finds a group name." ;; now, clear the entry if there are no more groups (when gnus-registry-trim-articles-without-groups (unless (gnus-registry-group-count id) - (remhash id gnus-registry-hashtb))) + (gnus-registry-delete-id id))) (gnus-registry-store-extra-entry id 'mtime (current-time))))) +(defun gnus-registry-delete-id (id) + "Delete a message ID from the registry." + (when (stringp id) + (remhash id gnus-registry-hashtb) + (maphash + (lambda (key value) + (when (hash-table-p value) + (remhash id value))) + gnus-registry-hashtb))) + (defun gnus-registry-add-group (id group &optional subject) "Add a group for a message, based on the message ID." ;; make sure there are no duplicate entries