From: hmurata Date: Tue, 11 Nov 2003 00:52:24 +0000 (+0000) Subject: * modb-standard.el (elmo-msgdb-append-entity): If entity or X-Git-Tag: wl-2_11_21~14 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=aa096c0b3f2730fa251fc38d8b3143dde8ab26b4;p=elisp%2Fwanderlust.git * modb-standard.el (elmo-msgdb-append-entity): If entity or message-id is nil do nothing. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 3eea7a6..108bc31 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,6 +1,11 @@ +2003-11-11 Hiroya Murata + + * modb-standard.el (elmo-msgdb-append-entity): If entity or + message-id is nil do nothing. + 2003-11-10 Yuuichi Teranishi - * elmo-imap4.el (elmo-imap4-disuse-server-flag-mailbox-regexp): + * elmo-imap4.el (elmo-imap4-disuse-server-flag-mailbox-regexp): Revival. (elmo-imap4-session): Removed use-flag slot. (elmo-imap4-session-select-mailbox): Undo last change. diff --git a/elmo/modb-standard.el b/elmo/modb-standard.el index 23d2580..5a60da4 100644 --- a/elmo/modb-standard.el +++ b/elmo/modb-standard.el @@ -411,32 +411,34 @@ (luna-define-method elmo-msgdb-append-entity ((msgdb modb-standard) entity &optional flags) - (let ((number (elmo-msgdb-message-entity-number - (elmo-message-entity-handler entity) entity)) - (msg-id (elmo-msgdb-message-entity-field - (elmo-message-entity-handler entity) entity 'message-id)) - duplicate) - ;; number-list - (modb-standard-set-number-list-internal - msgdb - (nconc (modb-standard-number-list-internal msgdb) - (list number))) - ;; entity-map - (let ((table (modb-standard-entity-map msgdb))) - (setq duplicate (elmo-get-hash-val msg-id table)) - (elmo-set-hash-val (modb-standard-key number) entity table) - (elmo-set-hash-val msg-id entity table)) - ;; modification flags - (modb-standard-set-message-modified msgdb number) - ;; flag-map - (when flags - (elmo-set-hash-val - (modb-standard-key number) - (cons number flags) - (modb-standard-flag-map msgdb)) - (modb-standard-countup-flags msgdb flags) - (modb-standard-set-flag-modified msgdb number)) - duplicate)) + (when entity + (let ((number (elmo-msgdb-message-entity-number + (elmo-message-entity-handler entity) entity)) + (msg-id (elmo-msgdb-message-entity-field + (elmo-message-entity-handler entity) entity 'message-id)) + duplicate) + (when msg-id + ;; number-list + (modb-standard-set-number-list-internal + msgdb + (nconc (modb-standard-number-list-internal msgdb) + (list number))) + ;; entity-map + (let ((table (modb-standard-entity-map msgdb))) + (setq duplicate (elmo-get-hash-val msg-id table)) + (elmo-set-hash-val (modb-standard-key number) entity table) + (elmo-set-hash-val msg-id entity table)) + ;; modification flags + (modb-standard-set-message-modified msgdb number) + ;; flag-map + (when flags + (elmo-set-hash-val + (modb-standard-key number) + (cons number flags) + (modb-standard-flag-map msgdb)) + (modb-standard-countup-flags msgdb flags) + (modb-standard-set-flag-modified msgdb number)) + duplicate)))) (luna-define-method elmo-msgdb-delete-messages ((msgdb modb-standard) numbers)