This commit was generated by cvs2svn to compensate for changes in r524,
[elisp/tm.git] / tm-body.el
index 102b4e6..ad1d61d 100644 (file)
@@ -1,5 +1,5 @@
 ;;;
-;;; $Id: tm-body.el,v 0.15 1994/08/05 01:49:35 morioka Exp $
+;;; $Id: tm-body.el,v 0.16 1994/08/20 12:38:07 morioka Exp $
 ;;;
 
 (provide 'tm-body)
                                                 default-encoding))
           (mime/decode-content boundary
                                (car ctype) encoding
-                               (mime/get-name ctype))
+                               (mime/get-name ctype boundary)
+                               )
           )
       )))
 
        (kill-buffer "FULL")
        ))
     ))
-    
-(defun mime/get-name (ctype)
-  (replace-as-filename
-   (or (cdr (assoc "name" (cdr ctype)))
-       (cdr (assoc "x-name" (cdr ctype)))
-       (message/get-field-body "Content-Description")
-       "")))
 
 (defun mime/narrow-to-content (boundary)
   (if boundary
        (goto-char (point-min))
        )))
 
+(defun mime/get-name (ctype &optional boundary)
+  (save-excursion
+    (save-restriction
+      (mime/narrow-to-content boundary)
+      (replace-as-filename
+       (or (cdr (assoc "name" (cdr ctype)))
+          (cdr (assoc "x-name" (cdr ctype)))
+          (message/get-field-body "Content-Description")
+          ""))
+      )))
+
 (defun mime/Content-Type (&optional boundary)
   (save-excursion
     (save-restriction