+2005-09-27 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * 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 <romain@orebokech.com>
* gnus-agent.el (gnus-agent-expire-group, gnus-agent-expire):
(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
: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"
(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."
(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)
(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