From d91a2ca1f2224258529272d9630d798cefb4782a Mon Sep 17 00:00:00 2001 From: ueno Date: Mon, 21 Aug 2000 08:16:08 +0000 Subject: [PATCH] * mime-view.el: Add setting for 'vcard-parse-string', `vcard-format-string' to autoload "vcard"; set up for "text/x-vcard"; add setting for `fill-flowed' to autoload "flow-fill". (mime-display-text/plain): Handle "format=flowed". --- mime-view.el | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/mime-view.el b/mime-view.el index 24678d0..824a718 100644 --- a/mime-view.el +++ b/mime-view.el @@ -649,6 +649,8 @@ Each elements are regexp of field-name.") '((body . visible) (body-presentation-method . mime-display-text/plain))) +(autoload 'fill-flowed "flow-fill") + (ctree-set-calist-strictly 'mime-preview-condition '((type . nil) @@ -667,6 +669,15 @@ Each elements are regexp of field-name.") (body . visible) (body-presentation-method . mime-display-text/richtext))) +(autoload 'vcard-parse-string "vcard") +(autoload 'vcard-format-string "vcard") + +(ctree-set-calist-strictly + 'mime-preview-condition + '((type . text)(subtype . x-vcard) + (body . visible) + (body-presentation-method . mime-display-text/x-vcard))) + (autoload 'mime-display-application/x-postpet "postpet") (ctree-set-calist-strictly @@ -732,6 +743,8 @@ Each elements are regexp of field-name.") (if (not (eq (char-after (1- (point))) ?\n)) (insert "\n") ) + (if (equal (cdr (assoc "format" situation)) "flowed") + (fill-flowed)) (mime-add-url-buttons) (run-hooks 'mime-display-text/plain-hook) )) @@ -756,6 +769,19 @@ Each elements are regexp of field-name.") (enriched-decode beg (point-max)) ))) +(defun mime-display-text/x-vcard (entity situation) + (save-restriction + (narrow-to-region (point-max)(point-max)) + (insert + (string-as-multibyte + (vcard-format-string + (vcard-parse-string + (mime-entity-content entity) + #'vcard-standard-filter)))) + (if (not (eq (char-after (1- (point))) ?\n)) + (insert "\n")) + (mime-add-url-buttons) + (run-hooks 'mime-display-text/x-vcard-hook))) (defvar mime-view-announcement-for-message/partial (if (and (>= emacs-major-version 19) window-system) -- 1.7.10.4