(gnus-nocem-verifyer): Default to gnus-nocem-epg-verify iff EasyPG is available.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 18 Feb 2009 10:01:48 +0000 (10:01 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 18 Feb 2009 10:01:48 +0000 (10:01 +0000)
lisp/ChangeLog
lisp/gnus-nocem.el

index 82d0cbf..5754e05 100644 (file)
@@ -2,7 +2,8 @@
 
        * gnus-nocem.el (gnus-nocem-groups): Remove invalid NoCeM groups.
        (gnus-nocem-issuers): List currently active issuers; fix custom type.
-       (gnus-nocem-verifyer): Default to gnus-nocem-epg-verify.
+       (gnus-nocem-verifyer): Default to gnus-nocem-epg-verify if EasyPG is
+       available.
        (gnus-nocem-epg-verify): New function.
 
 2009-02-15  Reiner Steib  <Reiner.Steib@gmx.de>
index a599298..ba7d167 100644 (file)
@@ -101,16 +101,24 @@ issuer registry."
   :group 'gnus-nocem
   :type 'integer)
 
-(defcustom gnus-nocem-verifyer 'gnus-nocem-epg-verify
+(defcustom gnus-nocem-verifyer (if (locate-library "epg")
+                                  'gnus-nocem-epg-verify
+                                'pgg-verify)
   "*Function called to verify that the NoCeM message is valid.
-One likely value is `gnus-nocem-epg-verify'.  If the function in this
-variable isn't bound, the message will be used unconditionally."
+If the function in this variable isn't bound, the message will be used
+unconditionally."
   :group 'gnus-nocem
   :version "23.1"
   :type '(radio (function-item gnus-nocem-epg-verify)
                (function-item pgg-verify)
                (function-item mc-verify)
-               (function :tag "other")))
+               (function :tag "other"))
+  :set (lambda (symbol value)
+        (custom-set-default symbol
+                            (if (and (eq value 'gnus-nocem-epg-verify)
+                                     (not (locate-library "epg")))
+                                'pgg-verify
+                              value))))
 
 (defcustom gnus-nocem-liberal-fetch nil
   "*If t try to fetch all messages which have @@NCM in the subject.