(mime-preview-original-major-mode): fixed.
authormorioka <morioka>
Wed, 28 Jul 1999 15:04:29 +0000 (15:04 +0000)
committermorioka <morioka>
Wed, 28 Jul 1999 15:04:29 +0000 (15:04 +0000)
(mime-view-entity-title): Use `mime-entity-read-field' instead of
`mime-read-field'.
(mime-display-message): Use `major-mode' of mime-entity-header-buffer
as the default value of original-major-mode.

mime-view.el

index 245684c..97060d9 100644 (file)
@@ -130,7 +130,7 @@ mother-buffer."
        (set-buffer mime-mother-buffer)
        (mime-preview-original-major-mode recursive)
        )
-    (cdr (assq 'original-major-mode
+    (cdr (assq 'major-mode
               (get-text-property (or point (point)) 'mime-view-situation)))))
 
 
@@ -220,8 +220,8 @@ mother-buffer."
     situation))
 
 (defun mime-view-entity-title (entity)
-  (or (mime-read-field 'Content-Description entity)
-      (mime-read-field 'Subject entity)
+  (or (mime-entity-read-field entity 'Content-Description)
+      (mime-entity-read-field entity 'Subject)
       (mime-entity-filename entity)
       ""))
 
@@ -975,6 +975,10 @@ keymap of MIME-View mode."
     (or preview-buffer
        (setq preview-buffer
              (concat "*Preview-" (mime-entity-name message) "*")))
+    (or original-major-mode
+       (setq original-major-mode
+             (with-current-buffer (mime-entity-header-buffer message)
+               major-mode)))
     ;; (set-buffer raw-buffer)
     ;; (setq mime-preview-buffer preview-buffer)
     (let ((inhibit-read-only t))