* modb-standard.el (elmo-msgdb-message-entity): Ditto.
2003-10-06 Yuuichi Teranishi <teranisi@gohome.org>
+ * modb-legacy.el (elmo-msgdb-message-entity): Return nil when key
+ is nil.
+ * modb-standard.el (elmo-msgdb-message-entity): Ditto.
+
* elmo-imap4.el (elmo-imap4-session): Added new slot `flags'.
(elmo-imap4-session-select-mailbox): Set it according to the SELECT
response.
msgdb))
(luna-define-method elmo-msgdb-message-entity ((msgdb modb-legacy) key)
- (elmo-get-hash-val
- (cond ((stringp key) key)
- ((numberp key) (format "#%d" key)))
- (elmo-msgdb-get-entity-hashtb msgdb)))
+ (when key
+ (elmo-get-hash-val
+ (cond ((stringp key) key)
+ ((numberp key) (format "#%d" key)))
+ (elmo-msgdb-get-entity-hashtb msgdb))))
(require 'product)
(product-provide (provide 'modb-legacy) (require 'elmo-version))
msgdb))
(luna-define-method elmo-msgdb-message-entity ((msgdb modb-standard) key)
- (let ((ret (elmo-get-hash-val
- (cond ((stringp key) key)
- ((numberp key) (modb-standard-key key)))
- (modb-standard-entity-map-internal msgdb))))
+ (let ((ret (and key
+ (elmo-get-hash-val
+ (cond ((stringp key) key)
+ ((numberp key) (modb-standard-key key)))
+ (modb-standard-entity-map-internal msgdb)))))
(if (eq 'autoload (car-safe ret))
(when modb-standard-divide-number
(modb-standard-load-entity