;;; hashcash.el --- Add hashcash payments to email
-;; Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software Foundation
+;; Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011 Free Software Foundation
;; Written by: Paul Foley <mycroft@actrix.gen.nz> (1997-2002)
;; Maintainer: Paul Foley <mycroft@actrix.gen.nz>
(eval-and-compile
(unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+(eval-when-compile (require 'cl)) ; for case
+
(defgroup hashcash nil
"Hashcash configuration."
:group 'mail)
"Generate a hashcash payment by finding a VAL-bit collison on STR."
(if (and (> val 0)
hashcash-path)
- (save-excursion
- (set-buffer (get-buffer-create " *hashcash*"))
+ (with-current-buffer (get-buffer-create " *hashcash*")
(erase-buffer)
(apply 'call-process hashcash-path nil t nil
"-m" "-q" "-b" (number-to-string val) str