tm 7.38.
[elisp/tm.git] / tm-view.el
index 7acb55a..f10508b 100644 (file)
@@ -8,7 +8,7 @@
 ;;; modified by Steven L. Baur <steve@miranova.com>
 ;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;;; Created: 1994/7/13 (1994/8/31 obsolete tm-body.el)
-;;; Version: $Revision: 7.37 $
+;;; Version: $Revision: 7.38 $
 ;;; Keywords: mail, news, MIME, multimedia
 ;;;
 ;;; This file is part of tm (Tools for MIME).
@@ -44,7 +44,7 @@
 ;;;
 
 (defconst mime-viewer/RCS-ID
-  "$Id: tm-view.el,v 7.37 1995/12/19 15:40:46 morioka Exp $")
+  "$Id: tm-view.el,v 7.38 1995/12/21 18:03:47 morioka Exp $")
 
 (defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID))
 (defconst mime/viewer-version mime-viewer/version)
@@ -435,7 +435,7 @@ The compressed face will be piped to this command.")
       (narrow-to-region beg end)
       (setq subj
            (mime-eword/decode-string
-            (mime-viewer/get-subject params encoding)))
+            (mime-article/get-subject params encoding)))
       )
     (set-buffer obuf)
     (setq nb (point))
@@ -526,7 +526,7 @@ The compressed face will be piped to this command.")
                     (function mime-viewer/play-content))
       )))
 
-(defun mime-viewer/get-subject (param &optional encoding)
+(defun mime-article/get-uu-filename (param &optional encoding)
   (if (member (or encoding
                  (cdr (assq 'encoding param))
                  )
@@ -537,30 +537,24 @@ The compressed face will be piped to this command.")
                    (buffer-substring (match-beginning 0)(match-end 0))
                  ))
            ""))
-    (let (ret)
-      (or (and (setq ret (assoc "name" param))
-              (rfc822/strip-quoted-string (cdr ret))
-              )
-         (and (setq ret (assoc "x-name" param))
-              (rfc822/strip-quoted-string (cdr ret))
-              )
-         
-         (save-excursion
-           (save-restriction
-             (goto-char (point-min))
-             (narrow-to-region (point-min)
-                               (or (and (search-forward "\n\n" nil t)
-                                        (match-beginning 0)
-                                        )
-                                   (point-max)))
-             (or
-              (rfc822/get-field-body "Content-Description")
-              (rfc822/get-field-body "Subject")
-              )))
-         ""))
     ))
 
-  
+(defun mime-article/get-subject (param &optional encoding)
+  (or (rfc822/get-field-body "Content-Description")
+      (rfc822/get-field-body "Subject")
+      (let (ret)
+       (if (or (and (setq ret (mime/Content-Disposition))
+                    (setq ret (assoc "filename" (cdr ret)))
+                    )
+               (setq ret (assoc "name" param))
+               (setq ret (assoc "x-name" param))
+               )
+           (rfc822/strip-quoted-string (cdr ret))
+         ))
+      (mime-article/get-uu-filename param encoding)
+      ""))
+
+
 ;;; @ content information
 ;;;