From: ueno Date: Mon, 21 Aug 2000 08:16:08 +0000 (+0000) Subject: * mime-view.el: Add setting for 'vcard-parse-string', X-Git-Tag: emiko-1_14-pgg-0_1-last-~31 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d91a2ca1f2224258529272d9630d798cefb4782a;p=elisp%2Fsemi.git * 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". --- 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)