Fix paren style.
[elisp/semi.git] / semi-setup.el
index ecdf2ae..09bda4e 100644 (file)
@@ -35,10 +35,8 @@ 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/*
@@ -68,9 +66,27 @@ it is used as hook to set."
            (body-presentation-method . mime-preview-text/html)))
         
         (set-alist 'mime-view-type-subtype-score-alist
-                   '(text . html) 3)
-        )))
+                   '(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
@@ -121,23 +137,9 @@ it is used as hook to set."
 
         (mime-add-condition
          'action
-         '((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-view-application/pkcs7-mime))
-         'strict "mime-pgp")
-
-        (mime-add-condition
-         'action
-         '((type . application)(subtype . x-pkcs7-mime)
-           (method . mime-view-application/pkcs7-mime))
-         'strict "mime-pgp")
-        ))
-  )
+         'strict "mime-pgp"))))
 
 
 ;;; @ for mime-edit
@@ -184,8 +186,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)