2005-03-27 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+ * modb-entity.el (initialize-instance): Define.
+ (modb-entity-handler-mime-charset): New internal function.
+ (modb-standard-entity-set-field): Use it.
+ (elmo-msgdb-message-entity-field): Ditto.
+ (elmo-msgdb-message-entity-field): Ditto.
+
* modb.el (elmo-msgdb-match-condition): Rewrite with
`elmo-condition-match'.
(elmo-msgdb-match-condition-primitive): New function.
"Return non-nil when the entity matches the condition.")
;; Generic implementation.
+(luna-define-method initialize-instance :after ((handler modb-entity-handler)
+ &rest init-args)
+ (unless (modb-entity-handler-mime-charset-internal handler)
+ (modb-entity-handler-set-mime-charset-internal handler elmo-mime-charset))
+ handler)
+
(luna-define-method modb-entity-handler-list-parameters
((handler modb-entity-handler))
(list 'mime-charset))
(setq updated t)))
updated))
+;; helper functions
+(defsubst modb-entity-handler-mime-charset (handler)
+ (or (modb-entity-handler-mime-charset-internal handler)
+ elmo-mime-charset))
+
(defun modb-entity-handler-equal-p (handler other)
"Return non-nil, if OTHER hanlder is equal this HANDLER."
(and (eq (luna-class-name handler)
(let (index)
(unless as-is
(let ((elmo-mime-charset
- (or (modb-entity-handler-mime-charset-internal (car entity))
- elmo-mime-charset)))
+ (modb-entity-handler-mime-charset (car entity))))
(setq value (modb-convert-field-value modb-standard-entity-normalizer
field value))))
(cond ((memq field '(message-id :message-id))
((handler modb-standard-entity-handler) entity field &optional type)
(and entity
(let ((elmo-mime-charset
- (or (modb-entity-handler-mime-charset-internal handler)
- elmo-mime-charset))
+ (modb-entity-handler-mime-charset handler))
index)
(modb-convert-field-value
modb-standard-entity-specializer
((handler modb-buffer-entity-handler) entity field &optional type)
(and entity
(let ((elmo-mime-charset
- (or (modb-entity-handler-mime-charset-internal handler)
- elmo-mime-charset)))
+ (modb-entity-handler-mime-charset handler)))
(modb-convert-field-value
modb-buffer-entity-specializer
field