From: yamaoka Date: Tue, 27 Sep 2005 02:17:07 +0000 (+0000) Subject: Synch to No Gnus 200509270216. X-Git-Tag: t-gnus-6_17_4-quimby-~344 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=669d70161d800b84e0691cc1a8a6b9dd030740c5;p=elisp%2Fgnus.git- Synch to No Gnus 200509270216. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3001c31..fc0483f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2005-09-27 Katsumi Yamaoka + + * gnus-art.el (gnus-mime-display-single): Don't modify text if it + has been decoded. + + * mm-decode.el (mm-automatic-display): Add text/verbatim. + (mm-insert-part): Don't modify text if it has been decoded. + + * mm-uu.el (mm-uu-verbatim-marks-extract): Say text has been + decoded. + + * mm-view.el (mm-inline-text): Don't strip text props unless + decoding enriched or richtext parts. + 2005-09-25 Romain Francoise * gnus-agent.el (gnus-agent-expire-group, gnus-agent-expire): diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index b7ba845..ea47716 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -5356,14 +5356,17 @@ If displaying \"text/html\" is discouraged \(see (forward-line -1) (setq beg (point))) (gnus-article-insert-newline) - (mm-insert-inline handle - (let ((charset - (mail-content-type-get - (mm-handle-type handle) 'charset))) - (if (eq charset 'gnus-decoded) - (mm-get-part handle) - (mm-decode-string (mm-get-part handle) - charset)))) + (mm-insert-inline + handle + (let ((charset (mail-content-type-get (mm-handle-type handle) + 'charset))) + (cond ((not charset) + (mm-string-as-multibyte (mm-get-part handle))) + ((eq charset 'gnus-decoded) + (with-current-buffer (mm-handle-buffer handle) + (buffer-string))) + (t + (mm-decode-string (mm-get-part handle) charset))))) (goto-char (point-max)))) ;; Do highlighting. (save-excursion diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index 3b48733..bc75be5 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -291,7 +291,7 @@ when selecting a different article." :group 'mime-display) (defcustom mm-automatic-display - '("text/plain" "text/enriched" "text/richtext" "text/html" + '("text/plain" "text/enriched" "text/richtext" "text/html" "text/verbatim" "text/x-vcard" "image/.*" "message/delivery-status" "multipart/.*" "message/rfc822" "text/x-patch" "text/dns" "application/pgp-signature" "application/emacs-lisp" "application/x-emacs-lisp" @@ -1051,10 +1051,16 @@ external if displayed external." (defun mm-insert-part (handle) "Insert the contents of HANDLE in the current buffer." - (save-excursion - (insert (if (mm-multibyte-p) - (mm-string-as-multibyte (mm-get-part handle)) - (mm-get-part handle))))) + (let ((charset (mail-content-type-get (mm-handle-type handle) 'charset))) + (save-excursion + (insert + (cond ((eq charset 'gnus-decoded) + (with-current-buffer (mm-handle-buffer handle) + (buffer-string))) + ((mm-multibyte-p) + (mm-string-as-multibyte (mm-get-part handle))) + (t + (mm-get-part handle))))))) (defun mm-file-name-delete-whitespace (file-name) "Remove all whitespace characters from FILE-NAME." diff --git a/lisp/mm-uu.el b/lisp/mm-uu.el index a75efda..d4410d7 100644 --- a/lisp/mm-uu.el +++ b/lisp/mm-uu.el @@ -289,7 +289,7 @@ apply the face `mm-uu-extract'." (progn (goto-char start-point) (forward-line) (point)) (progn (goto-char end-point) (forward-line -1) (point)) t) - '("text/verbatim"))) + '("text/verbatim" (charset . gnus-decoded)))) (defun mm-uu-emacs-sources-extract () (mm-make-handle (mm-uu-copy-to-buffer start-point end-point) diff --git a/lisp/mm-view.el b/lisp/mm-view.el index 123f1a7..ed1ff3c 100644 --- a/lisp/mm-view.el +++ b/lisp/mm-view.el @@ -371,9 +371,9 @@ (goto-char (point-max)))) (save-restriction (narrow-to-region b (point)) - (set-text-properties (point-min) (point-max) nil) (when (or (equal type "enriched") (equal type "richtext")) + (set-text-properties (point-min) (point-max) nil) (ignore-errors (enriched-decode (point-min) (point-max)))) (mm-handle-set-undisplayer