Bind RET and TAB on images for better UX.
[gnus] / lisp / gnus-nocem.el
index a599298..0364c96 100644 (file)
@@ -1,7 +1,7 @@
 ;;; gnus-nocem.el --- NoCeM pseudo-cancellation treatment
 
 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
@@ -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.
@@ -441,5 +449,4 @@ valid issuer, which is much faster if you are selective about the issuers."
 
 (provide 'gnus-nocem)
 
-;; arch-tag: 0e0c74ea-2f8e-4f3e-8fff-09f767c1adef
 ;;; gnus-nocem.el ends here