* wl-draft.el (wl-draft-reedit): Do not decode part in
authoryoichi <yoichi>
Tue, 5 Nov 2002 04:58:02 +0000 (04:58 +0000)
committeryoichi <yoichi>
Tue, 5 Nov 2002 04:58:02 +0000 (04:58 +0000)
`mime-edit-decode-single-part-in-buffer' unless it is text part.
(Although it seems semi issue. [wl:10790])

wl/ChangeLog
wl/wl-draft.el

index 2696a65..b03aad0 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-04  Yoichi NAKAYAMA  <yoichi@eken.phys.nagoya-u.ac.jp>
+
+       * wl-draft.el (wl-draft-reedit): Do not decode part in
+       `mime-edit-decode-single-part-in-buffer' unless it is text part.
+       (Although it seems semi issue. [wl:10790])
+
 2002-11-01  Tomotaka SUWA  <cooper@saitama.fujimic.fujisankei-g.co.jp>
 
        * wl-address.el (wl-address-make-completion-entry): Extracted from
index cf637ca..4cb9fae 100644 (file)
@@ -1872,7 +1872,20 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed"
       (insert-file-contents-as-binary file-name)
       (let((mime-edit-again-ignored-field-regexp
            "^\\(Content-.*\\|Mime-Version\\):"))
-       (wl-draft-decode-message-in-buffer))
+;      (wl-draft-decode-message-in-buffer))
+       ;;;; From gnus-article-mime-edit-article-setup in T-gnus
+       ;;;; XXX: it is semi issue, perhaps [wl:10790]
+       (let ((ofn (symbol-function 'mime-edit-decode-single-part-in-buffer)))
+         (fset 'mime-edit-decode-single-part-in-buffer
+               (lambda (&rest args)
+                 (unless (let ((content-type (car args)))
+                           (eq 'text (mime-content-type-primary-type
+                                      content-type)))
+                   (setcar (cdr args) 'not-decode-text))
+                 (apply ofn args)))
+         (unwind-protect
+             (wl-draft-decode-message-in-buffer)
+           (fset 'mime-edit-decode-single-part-in-buffer ofn))))
       (wl-draft-insert-mail-header-separator)
       (if (not (string-match (regexp-quote wl-draft-folder)
                             (buffer-name)))