(mime-method-to-display-message/rfc822): Use
authormorioka <morioka>
Tue, 2 Jun 1998 17:27:32 +0000 (17:27 +0000)
committermorioka <morioka>
Tue, 2 Jun 1998 17:27:32 +0000 (17:27 +0000)
`mime-raw-representation-type-alist' instead of
`mime-text-decoder-alist'; set up to `mime-raw-representation-type'
instead of `mime-text-decoder'.
(mime-method-to-display-caesar): Use `mime-text-insert-decoded-body'.

mime-play.el

index a7326a0..1bf476d 100644 (file)
@@ -420,9 +420,9 @@ It is registered to variable `mime-preview-quitting-method-alist'."
   (let* ((cnum (mime-raw-point-to-entity-number beg))
         (new-name (format "%s-%s" (buffer-name) cnum))
         (mother mime-preview-buffer)
-        (text-decoder
-         (cdr (or (assq major-mode mime-text-decoder-alist)
-                  (assq t mime-text-decoder-alist))))
+        (representation-type
+         (cdr (or (assq major-mode mime-raw-representation-type-alist)
+                  (assq t mime-raw-representation-type-alist))))
         str)
     (setq str (buffer-substring beg end))
     (switch-to-buffer new-name)
@@ -433,7 +433,7 @@ It is registered to variable `mime-preview-quitting-method-alist'."
        (delete-region (point-min) (match-end 0))
       )
     (setq major-mode 'mime-show-message-mode)
-    (setq mime-text-decoder text-decoder)
+    (setq mime-raw-representation-type representation-type)
     (mime-view-mode mother)
     ))
 
@@ -606,14 +606,14 @@ to write."
 
 (defun mime-method-to-display-caesar (start end cal)
   "Internal method for mime-view to display ROT13-47-48 message."
-  (let* ((cnum (mime-raw-point-to-entity-number start))
+  (let* ((entity (mime-raw-find-entity-from-point start))
+        (cnum (reverse (mime-entity-node-id entity)))
         (new-name (format "%s-%s" (buffer-name) cnum))
         (the-buf (current-buffer))
         (mother mime-preview-buffer)
         (charset (cdr (assoc "charset" cal)))
         (encoding (cdr (assq 'encoding cal)))
-        (mode major-mode)
-        )
+        (mode major-mode))
     (let ((pwin (or (get-buffer-window mother)
                    (get-largest-window)))
          (buf (get-buffer-create new-name))
@@ -624,16 +624,7 @@ to write."
       )
     (setq buffer-read-only nil)
     (erase-buffer)
-    (insert-buffer-substring the-buf start end)
-    (goto-char (point-min))
-    (if (re-search-forward "^\n" nil t)
-       (delete-region (point-min) (match-end 0))
-      )
-    (let ((m (cdr (or (assq mode mime-text-decoder-alist)
-                     (assq t mime-text-decoder-alist)))))
-      (and (functionp m)
-          (funcall m charset encoding)
-          ))
+    (mime-text-insert-decoded-body entity)
     (mule-caesar-region (point-min) (point-max))
     (set-buffer-modified-p nil)
     (set-buffer mother)