(mime-display-image): Don't wait for redisplay.
[elisp/semi.git] / semi-setup.el
index 168ce71..a721520 100644 (file)
@@ -1,6 +1,6 @@
 ;;; semi-setup.el --- setup file for MIME-View.
 
-;; Copyright (C) 1994,1995,1996,1997,1998,1999 Free Software Foundation, Inc.
+;; Copyright (C) 1994,1995,1996,1997,1998 Free Software Foundation, Inc.
 
 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
 ;; Keywords: mail, news, MIME, multimedia, multilingual, encoded-word
@@ -41,22 +41,15 @@ it is used as hook to set."
     ))
 
 
-;; 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
@@ -83,9 +76,8 @@ it is used as hook to set."
 
 
 ;; for PGP
-(defvar mime-setup-enable-pgp
-  (module-installed-p 'mailcrypt)
-  "*If it is non-nil, semi-setup sets up to use mime-pgp.")
+(defvar mime-setup-enable-pgp t
+  "*If it is non-nil, semi-setup sets uf to use mime-pgp.")
 
 (if mime-setup-enable-pgp
     (eval-after-load "mime-view"
@@ -123,29 +115,33 @@ it is used as hook to set."
          '((type . application)(subtype . pgp-keys)
            (method . mime-add-application/pgp-keys))
          'strict "mime-pgp")
+
+        (mime-add-condition
+         'action
+         '((type . application)(subtype . pkcs7-signature)
+           (method . mime-verify-application/pkcs7-signature))
+         'strict "mime-pgp")
+
+        (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")
         ))
   )
 
-(if mime-setup-enable-pgp
-    (progn
-      (autoload 'mime-pgp-setversion "mime-pgp" nil t)
-      (add-hook
-       'mime-pgp-setversion-hook
-       (function
-       (lambda ()
-         (require 'mailcrypt)
-         (condition-case nil
-             (let ((version
-                    (cdr (assq (symbol-value 'mime-pgp-default-scheme)
-                               '((gpg   . "gpg")
-                                 (pgp50 . "5.0")
-                                 (pgp   . "2.6"))))))
-               (eval (list 'mc-setversion version))
-               )
-           (error nil))
-         )))
-      ))
-
 
 ;;; @ for mime-edit
 ;;;