* eword-decode.el (eword-decode-field): New function.
[elisp/flim.git] / mime.el
diff --git a/mime.el b/mime.el
index a0211ef..57fe2e2 100644 (file)
--- a/mime.el
+++ b/mime.el
@@ -276,23 +276,20 @@ If MESSAGE is specified, it is regarded as root entity."
                          (setq field (std11-parse-address
                                       (eword-lexical-analyze field-body)))
                          )
-                        ((memq field-name eword-decode-ignored-field-list)
-                         (setq field field-body))
-                        ((memq field-name eword-decode-structured-field-list)
-                         (setq field (eword-decode-structured-field-body
-                                      field-body)))
                         (t
-                         (setq field (eword-decode-unstructured-field-body
-                                      field-body))
+                         (setq field (eword-decode-field field-name field-body))
                          ))
                   (mime-entity-set-parsed-header-internal
                    entity (put-alist field-name field header))
                   field)))))))
 
-(mm-define-generic insert-decoded-header (entity &optional invisible-fields
-                                         visible-fields)
+(mm-define-generic insert-header (entity &optional invisible-fields
+                                        visible-fields)
   "Insert before point a decoded header of ENTITY.")
 
+(define-obsolete-function-alias
+  'mime-insert-decoded-header 'mime-insert-header)
+
 
 ;;; @ Entity Attributes
 ;;;
@@ -337,6 +334,9 @@ If MESSAGE is specified, it is regarded as root entity."
 (mm-define-generic entity-content (entity)
   "Return content of ENTITY as byte sequence (string).")
 
+(mm-define-generic insert-text-content (entity)
+  "Insert decoded text body of ENTITY.")
+
 (mm-define-generic write-entity-content (entity filename)
   "Write content of ENTITY into FILENAME.")