X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=semi-setup.el;h=013d933346094033df0b03bcd7d348b15da1e5d7;hb=fddb14845c4276bb42707adb26d4106c219c9469;hp=63751ea969e968f30fbd8493ed702ba86e6f57af;hpb=3b5ddb3debc5217e3e04d686afb05f0a57242b0f;p=elisp%2Fsemi.git diff --git a/semi-setup.el b/semi-setup.el index 63751ea..013d933 100644 --- a/semi-setup.el +++ b/semi-setup.el @@ -1,8 +1,8 @@ ;;; semi-setup.el --- setup file for MIME-View. -;; Copyright (C) 1994,1995,1996,1997,1998 Free Software Foundation, Inc. +;; Copyright (C) 1994,95,96,97,98,99,2000 Free Software Foundation, Inc. -;; Author: MORIOKA Tomohiko +;; Author: MORIOKA Tomohiko ;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word ;; This file is part of SEMI (Setting for Emacs MIME Interfaces). @@ -35,28 +35,19 @@ it is used as hook to set." (if (featurep module) (funcall func) (or hook-name - (setq hook-name (intern (concat (symbol-name module) "-load-hook"))) - ) - (add-hook hook-name func) - )) + (setq hook-name (intern (concat (symbol-name module) "-load-hook")))) + (add-hook hook-name func))) -;; for image/* and X-Face +;; for image/* (defvar mime-setup-enable-inline-image (and window-system - (or (featurep 'xemacs) - (and (featurep 'mule)(module-installed-p 'bitmap)) - )) + (or (featurep 'xemacs)(featurep 'mule))) "*If it is non-nil, semi-setup sets up to use mime-image.") (if mime-setup-enable-inline-image - (call-after-loaded 'mime-view - (function - (lambda () - (require 'mime-image) - ))) - ) - + (eval-after-load "mime-view" + '(require 'mime-image))) ;; for text/html (defvar mime-setup-enable-inline-html @@ -64,23 +55,38 @@ it is used as hook to set." "*If it is non-nil, semi-setup sets up to use mime-w3.") (if mime-setup-enable-inline-html - (call-after-loaded - 'mime-view - (function - (lambda () - (autoload 'mime-preview-text/html "mime-w3") - - (ctree-set-calist-strictly - 'mime-preview-condition - '((type . text)(subtype . html) - (body . visible) - (body-presentation-method . mime-preview-text/html))) - - (set-alist 'mime-view-type-subtype-score-alist - '(text . html) 3) - ))) - ) + (eval-after-load "mime-view" + '(progn + (autoload 'mime-preview-text/html "mime-w3") + + (ctree-set-calist-strictly + 'mime-preview-condition + '((type . text)(subtype . html) + (body . visible) + (body-presentation-method . mime-preview-text/html))) + + (set-alist 'mime-view-type-subtype-score-alist + '(text . html) 3)))) + +;; for text/x-vcard +(defvar mime-setup-enable-vcard + (module-installed-p 'vcard) + "*If it is non-nil, semi-setup sets uf to use mime-vcard.") +(if mime-setup-enable-vcard + (eval-after-load "mime-view" + '(progn + (autoload 'mime-display-text/x-vcard "mime-vcard") + + (mime-add-condition + 'preview + '((type . text)(subtype . x-vcard) + (body . visible) + (body-presentation-method . mime-display-text/x-vcard)) + 'strict) + + (set-alist 'mime-view-type-subtype-score-alist + '(text . x-vcard) 3)))) ;; for PGP (defvar mime-setup-enable-pgp t @@ -134,20 +140,18 @@ it is used as hook to set." '((type . application)(subtype . x-pkcs7-signature) (method . mime-verify-application/pkcs7-signature)) 'strict "mime-pgp") - + (mime-add-condition 'action '((type . application)(subtype . pkcs7-mime) - (method . mime-decrypt-application/pkcs7-mime)) + (method . mime-view-application/pkcs7-mime)) 'strict "mime-pgp") (mime-add-condition 'action '((type . application)(subtype . x-pkcs7-mime) - (method . mime-decrypt-application/pkcs7-mime)) - 'strict "mime-pgp") - )) - ) + (method . mime-view-application/pkcs7-mime)) + 'strict "mime-pgp")))) ;;; @ for mime-edit @@ -194,8 +198,7 @@ it is used as hook to set." (let ((key (or (cdr (assq major-mode mime-setup-signature-key-alist)) mime-setup-default-signature-key))) - (define-key keymap key (function insert-signature)) - )))) + (define-key keymap key (function insert-signature)))))) (when mime-setup-use-signature (autoload 'insert-signature "signature" "Insert signature" t)