;;; mm-view.el --- functions for viewing MIME objects
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003,
-;; 2004 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
+;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; This file is part of GNU Emacs.
(let ((b (point-marker))
buffer-read-only)
(put-image (mm-get-image handle) b)
+ (insert "\n\n")
(mm-handle-set-undisplayer
handle
`(lambda ()
(setq w3m-display-inline-images mm-inline-text-html-with-images))
(defun mm-w3m-cid-retrieve-1 (url handle)
- (if (mm-multiple-handles handle)
- (dolist (elem handle)
- (mm-w3m-cid-retrieve-1 url elem))
- (when (and (listp handle)
- (equal url (mm-handle-id handle)))
- (mm-insert-part handle)
- (throw 'found-handle (mm-handle-media-type handle)))))
+ (dolist (elem handle)
+ (when (listp elem)
+ (if (equal url (mm-handle-id elem))
+ (progn
+ (mm-insert-part elem)
+ (throw 'found-handle (mm-handle-media-type elem))))
+ (if (equal "multipart" (mm-handle-media-supertype elem))
+ (mm-w3m-cid-retrieve-1 url elem)))))
(defun mm-w3m-cid-retrieve (url &rest args)
"Insert a content pointed by URL if it has the cid: scheme."
(buffer-string)))))
(defun mm-inline-render-with-function (handle func &rest args)
- (let ((source (mm-get-part handle)))
+ (let ((source (mm-get-part handle))
+ (charset (mail-content-type-get (mm-handle-type handle) 'charset)))
(mm-insert-inline
handle
- (mm-with-unibyte-buffer
- (insert source)
+ (mm-with-multibyte-buffer
+ (insert (if charset
+ (mm-decode-string source charset)
+ source))
(apply func args)
(buffer-string)))))
(defun mm-display-elisp-inline (handle)
(mm-display-inline-fontify handle 'emacs-lisp-mode))
+(defun mm-display-dns-inline (handle)
+ (mm-display-inline-fontify handle 'dns-mode))
+
;; id-signedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
;; us(840) rsadsi(113549) pkcs(1) pkcs7(7) 2 }
(defvar mm-pkcs7-signed-magic