(mime-put-keymap-region): New macro.
[elisp/semi.git] / mime-text.el
index 8aedc41..8483630 100644 (file)
@@ -36,15 +36,16 @@ It decodes MIME-encoding then code-converts as MIME-charset.
 MIME-encoding is value of field 'encoding of SITUATION.  It must be
 'nil or string.  MIME-charset is value of field \"charset\" of
 SITUATION.  It must be symbol."
-  (let ((presentation-type
+  (let* ((buffer (mime-entity-buffer entity))
+        (presentation-type
         (save-excursion
-          (set-buffer mime-raw-buffer)
+          (set-buffer buffer)
           (or mime-raw-representation-type
               (cdr (or (assq major-mode mime-raw-representation-type-alist)
                        (assq t mime-raw-representation-type-alist)))
               ))))
     (save-restriction
-      (insert-buffer-substring mime-raw-buffer
+      (insert-buffer-substring buffer
                               (mime-entity-body-start entity)
                               (mime-entity-body-end entity))
       (let ((encoding (mime-entity-encoding entity)))