;;; hashcash.el --- Add hashcash payments to email
-;; Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation
+;; Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software Foundation
;; Written by: Paul Foley <mycroft@actrix.gen.nz> (1997-2002)
;; Maintainer: Paul Foley <mycroft@actrix.gen.nz>
;;; Code:
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(defgroup hashcash nil
"Hashcash configuration."
:group 'mail)
(require 'mail-utils)
(eval-and-compile
- (if (fboundp 'point-at-bol)
- (defalias 'hashcash-point-at-bol 'point-at-bol)
- (defalias 'hashcash-point-at-bol 'line-beginning-position))
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))
- (if (fboundp 'point-at-eol)
- (defalias 'hashcash-point-at-eol 'point-at-eol)
- (defalias 'hashcash-point-at-eol 'line-end-position)))
+ (if (fboundp 'point-at-bol)
+ (defalias 'hashcash-point-at-bol 'point-at-bol)
+ (defalias 'hashcash-point-at-bol 'line-beginning-position))
+
+ (if (fboundp 'point-at-eol)
+ (defalias 'hashcash-point-at-eol 'point-at-eol)
+ (defalias 'hashcash-point-at-eol 'line-end-position)))
(defun hashcash-strip-quoted-names (addr)
(setq addr (mail-strip-quoted-names addr))
(concat (match-string 1 addr) (match-string 2 addr))
addr))
+(declare-function message-narrow-to-headers-or-head "message" ())
+(declare-function message-fetch-field "message" (header &optional not-all))
+(declare-function message-goto-eoh "message" ())
+(declare-function message-narrow-to-headers "message" ())
+
(defun hashcash-token-substring ()
(save-excursion
(let ((token ""))
(when (and hashcash-in-news ng)
(setq addrlist (nconc addrlist (split-string ng ",[ \t\n]*")))))
(when addrlist
- (mapcar (if async
- #'hashcash-insert-payment-async
- #'hashcash-insert-payment)
- addrlist))))) ; mapc
+ (mapc (if async
+ #'hashcash-insert-payment-async
+ #'hashcash-insert-payment)
+ addrlist)))))
t)
;;;###autoload