tm 7.15.
[elisp/tm.git] / tm-view.el
index c9f513e..8d17373 100644 (file)
@@ -25,7 +25,7 @@
 ;;;
 
 (defconst mime-viewer/RCS-ID
-  "$Id: tm-view.el,v 7.13 1995/10/12 06:10:04 morioka Exp $")
+  "$Id: tm-view.el,v 7.15 1995/10/13 08:43:49 morioka Exp $")
 
 (defconst mime-viewer/version (get-version-string mime-viewer/RCS-ID))
 (defconst mime/viewer-version mime-viewer/version)
@@ -278,14 +278,19 @@ The compressed face will be piped to this command.")
 
 (defun mime-viewer/x-face-function ()
   "Function to display X-Face field. You can redefine to customize."
-  (goto-char (point-min))
-  (if (re-search-forward "^X-Face:[ \t]*" nil t)
-      (let ((beg (match-end 0))
-           (end (rfc822/field-end))
-           )
-       (call-process-region beg end "sh" nil 0 nil
-                            "-c" mime-viewer/x-face-command)
-       )))
+  ;; 1995/10/12 (c.f. tm-eng:130)
+  ;;   fixed by Eric Ding <ericding@San-Jose.ate.slb.com>
+  (save-restriction
+    (narrow-to-region (point-min) (re-search-forward "^$" nil t))
+    ;; end
+    (goto-char (point-min))
+    (if (re-search-forward "^X-Face:[ \t]*" nil t)
+       (let ((beg (match-end 0))
+             (end (rfc822/field-end))
+             )
+         (call-process-region beg end "sh" nil 0 nil
+                              "-c" mime-viewer/x-face-command)
+         ))))
 
 
 ;;; @ data structures
@@ -374,7 +379,9 @@ The compressed face will be piped to this command.")
       )
     (save-restriction
       (narrow-to-region beg end)
-      (setq subj (mime-viewer/get-subject params encoding))
+      (setq subj
+           (mime/decode-encoded-words-string
+            (mime-viewer/get-subject params encoding)))
       )
     (set-buffer obuf)
     (setq nb (point))