From 7fb7ea306b78258c5772cf839d4a239e3b63e3a8 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 28 Feb 2001 01:23:12 +0000 Subject: [PATCH] * gnus-art.el (gnus-article-mime-edit-article-setup): Leave the forwarded parts undecoded. (gnus-article-decode-article-as-default-mime-charset): Set the value of `default-mime-charset' buffer-locally. --- ChangeLog | 7 +++++++ lisp/gnus-art.el | 19 ++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b4ef3c0..ed33c0b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-02-28 Katsumi Yamaoka + + * lisp/gnus-art.el (gnus-article-mime-edit-article-setup): Leave + the forwarded parts undecoded. + (gnus-article-decode-article-as-default-mime-charset): Set the + value of `default-mime-charset' buffer-locally. + 2001-02-27 Katsumi Yamaoka * lisp/gnus.el: Add autoloads for diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 165f97d..d57807e 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -3277,9 +3277,11 @@ If ALL-HEADERS is non-nil, no headers are hidden." "Decode an article as `default-mime-charset'. It won't work if the value of the variable `gnus-show-mime' is non-nil." (unless gnus-show-mime + (set (make-local-variable 'default-mime-charset) + (with-current-buffer gnus-summary-buffer + default-mime-charset)) (decode-mime-charset-region (point-min) (point-max) - (with-current-buffer gnus-summary-buffer - default-mime-charset)))) + default-mime-charset))) ;;; ;;; Gnus MIME viewing functions @@ -4664,7 +4666,18 @@ after replacing with the original article." gnus-article-edit-mode-map) (erase-buffer) (insert-buffer gnus-original-article-buffer) - (mime-edit-again) + (let ((ofn (symbol-function 'mime-edit-decode-single-part-in-buffer))) + (fset 'mime-edit-decode-single-part-in-buffer + (lambda (&rest args) + (if (let ((content-type (car args))) + (and (eq 'message (mime-content-type-primary-type + content-type)) + (eq 'rfc822 (mime-content-type-subtype content-type)))) + (setcar (cdr args) 'not-decode-text)) + (apply ofn args))) + (unwind-protect + (mime-edit-again) + (fset 'mime-edit-decode-single-part-in-buffer ofn))) (when (featurep 'font-lock) (set (make-local-variable 'font-lock-defaults) '(message-font-lock-keywords t)) -- 1.7.10.4