1 ;;; mime-vcard.el --- mime-view content filter for vCard.
3 ;; Copyright (C) 2000 Free Software Foundation, Inc.
5 ;; Author: Daiki Ueno <ueno@unixuser.org>
6 ;; Keywords: vCard, MIME, multimedia, mail, news
8 ;; This file is part of SEMI (Sample of Elastic MIME Interfaces).
10 ;; This program is free software; you can redistribute it and/or
11 ;; modify it under the terms of the GNU General Public License as
12 ;; published by the Free Software Foundation; either version 2, or (at
13 ;; your option) any later version.
15 ;; This program is distributed in the hope that it will be useful, but
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ;; General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
33 (defvar mime-vcard-standard-filters
34 (cons #'mime-vcard-filter-quoted-printable
35 vcard-standard-filters))
37 (defun mime-vcard-filter-quoted-printable (key data)
39 (when (string-match ";\\(encoding=\\)?quoted-printable$" key)
40 (while (string-match "\\(=[0-9A-F][0-9A-F]\\)+" data)
47 (match-string 0 data) "quoted-printable")
52 (defun mime-display-text/x-vcard (entity situation)
54 (narrow-to-region (point-max)(point-max))
55 (let ((vcard-standard-filters mime-vcard-standard-filters))
60 (mime-entity-content entity)
61 #'vcard-standard-filter)))))
62 (if (not (eq (char-after (1- (point))) ?\n))
64 (mime-add-url-buttons)
65 (run-hooks 'mime-display-text/x-vcard-hook)))
69 ;;; mime-vcard.el ends here