* spam.el: Load hashcash when compiling, to avoid warnings. Don't
authorSimon Josefsson <jas@extundo.com>
Fri, 30 Sep 2005 00:19:15 +0000 (00:19 +0000)
committerSimon Josefsson <jas@extundo.com>
Fri, 30 Sep 2005 00:19:15 +0000 (00:19 +0000)
autoload mail-check-payment.
(spam-check-hashcash): Define unconditionally, since hashcash.el
is part of Gnus now.  Ignore errors from payment checking.

lisp/ChangeLog
lisp/spam.el

index a5d15e9..b11e948 100644 (file)
@@ -1,3 +1,10 @@
+2005-09-29  Simon Josefsson  <jas@extundo.com>
+
+       * spam.el: Load hashcash when compiling, to avoid warnings.  Don't
+       autoload mail-check-payment.
+       (spam-check-hashcash): Define unconditionally, since hashcash.el
+       is part of Gnus now.  Ignore errors from payment checking.
+
 2005-09-28  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * message.el (message-bold-region, message-unbold-region): Rename
index 0ba1946..0c4922c 100644 (file)
@@ -42,6 +42,7 @@
 
 (eval-when-compile (require 'cl))
 (eval-when-compile (require 'spam-report))
+(eval-when-compile (require 'hashcash))
 
 (require 'gnus-sum)
 
@@ -2023,18 +2024,10 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
 
 ;;{{{ Hashcash.
 
-(eval-when-compile
-  (autoload 'mail-check-payment "hashcash"))
-
-(condition-case nil
-    (progn
-      (require 'hashcash)
-
-      (defun spam-check-hashcash ()
-       "Check the headers for hashcash payments."
-       (mail-check-payment)))   ;mail-check-payment returns a boolean
+(defun spam-check-hashcash ()
+  "Check the headers for hashcash payments."
+  (ignore-errors (mail-check-payment)))         ;mail-check-payment returns a boolean
 
-  (file-error))
 ;;}}}
 
 ;;{{{ BBDB