Add autoload settings for `mime-entity-content-type',
authormorioka <morioka>
Sat, 24 Jul 1999 07:43:39 +0000 (07:43 +0000)
committermorioka <morioka>
Sat, 24 Jul 1999 07:43:39 +0000 (07:43 +0000)
`mime-parse-multipart' and `mime-parse-encapsulated' [to avoid
warning].
(mime-entity-children): New method of `mime-entity' [moved from
mmbuffer.el].

mime-def.el

index e1b6b0f..6b8effd 100644 (file)
 
 (require 'luna)
 
+(autoload 'mime-entity-content-type "mime")
+(autoload 'mime-parse-multipart "mime-parse")
+(autoload 'mime-parse-encapsulated "mime-parse")
+
 (luna-define-class mime-entity ()
                   (location
                    content-type children parent
   (cdr (assq field-name
             (mime-entity-original-header-internal entity))))
 
+(luna-define-method mime-entity-children ((entity mime-entity))
+  (let* ((content-type (mime-entity-content-type entity))
+        (primary-type (mime-content-type-primary-type content-type)))
+    (cond ((eq primary-type 'multipart)
+          (mime-parse-multipart entity)
+          )
+         ((and (eq primary-type 'message)
+               (memq (mime-content-type-subtype content-type)
+                     '(rfc822 news external-body)
+                     ))
+          (mime-parse-encapsulated entity)
+          ))
+    ))
+
 
 ;;; @ for mm-backend
 ;;;