(require 'mm-bodies)
(require 'mm-decode)
+(eval-and-compile
+ (autoload 'gnus-article-prepare-display "gnus-art")
+ (autoload 'vcard-parse-string "vcard")
+ (autoload 'vcard-format-string "vcard"))
+
;;;
;;; Functions for displaying various formats inline
;;;
(save-restriction
(narrow-to-region b (point))
(save-window-excursion
- (let ((w3-strict-width width))
+ (let ((w3-strict-width width)
+ (url-standalone-mode t))
(w3-region (point-min) (point-max)))))
(mm-handle-set-undisplayer
handle
(enriched-decode (point-min) (point-max))
(setq text (buffer-string)))))
(mm-insert-inline handle text))
+ ((equal type "x-vcard")
+ (mm-insert-inline
+ handle
+ (concat "\n-- \n"
+ (vcard-format-string
+ (vcard-parse-string (mm-get-part handle)
+ 'vcard-standard-filter)))))
(t
(setq text (mm-get-part handle))
(let ((b (point))
(defun mm-w3-prepare-buffer ()
(require 'w3)
- (w3-prepare-buffer))
-
-(eval-and-compile
- (autoload 'gnus-article-prepare-display "gnus-art"))
+ (let ((url-standalone-mode t))
+ (w3-prepare-buffer)))
(defun mm-view-message ()
+ (mm-enable-multibyte)
(gnus-article-prepare-display)
(run-hooks 'gnus-article-decode-hook)
(fundamental-mode)
(goto-char (point-min)))
+(defun mm-inline-message (handle)
+ (let ((b (point)))
+ (save-excursion
+ (save-restriction
+ (narrow-to-region b b)
+ (mm-insert-part handle)
+ (run-hooks 'gnus-article-decode-hook)
+ (gnus-article-prepare-display)
+ (mm-handle-set-undisplayer
+ handle
+ `(lambda ()
+ (let (buffer-read-only)
+ (mapc (lambda (prop)
+ (remove-specifier
+ (face-property 'default prop) (current-buffer)))
+ '(background background-pixmap foreground))
+ (delete-region ,(point-min-marker) ,(point-max-marker)))))))))
+
(provide 'mm-view)
;; mm-view.el ends here