From 199bfa0a8a6048e54d75b66c0b2720af1ec3da40 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Tue, 28 Sep 2004 14:38:36 +0000 Subject: [PATCH] (hashcash-generate-payment) (hashcash-check-payment): Use error. --- lisp/ChangeLog | 5 +++++ lisp/hashcash.el | 14 ++++---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bba9174f1..17f6a1dd4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2004-09-28 Simon Josefsson + + * hashcash.el (hashcash-generate-payment) + (hashcash-check-payment): Use error. + 2004-09-28 Teodor Zlatanov * gnus-registry.el (gnus-registry-split-fancy-with-parent): use diff --git a/lisp/hashcash.el b/lisp/hashcash.el index d87c5cd23..fd9190a14 100644 --- a/lisp/hashcash.el +++ b/lisp/hashcash.el @@ -1,7 +1,7 @@ ;;; hashcash.el --- Add hashcash payments to email ;; Copyright (C) 1997--2002 Paul E. Foley -;; Copyright (C) 2003 Free Software Foundation +;; Copyright (C) 2003, 2004 Free Software Foundation ;; Maintainer: Paul Foley ;; Keywords: mail, hashcash @@ -111,7 +111,7 @@ is used instead.") (defun hashcash-generate-payment (str val) "Generate a hashcash payment by finding a VAL-bit collison on STR." - (if (and (> val 0) + (if (and (> val 0) hashcash-path) (save-excursion (set-buffer (get-buffer-create " *hashcash*")) @@ -120,10 +120,7 @@ is used instead.") "-m" "-q" "-b" (number-to-string val) str) (goto-char (point-min)) (hashcash-token-substring)) - (progn - (message "No hashcash binary found") - (sleep-for 1) - nil))) + (error "No `hashcash' binary found"))) (defun hashcash-check-payment (token str val) "Check the validity of a hashcash payment." @@ -133,10 +130,7 @@ is used instead.") "-b" (number-to-string val) "-r" str token)) - (progn - (message "No hashcash binary found") - (sleep-for 1) - nil))) + (error "No `hashcash' binary found"))) (defun hashcash-version (token) "Find the format version of a hashcash token." -- 2.25.1