Mercurial > emacs
comparison lisp/mail/hashcash.el @ 107413:a21a1c5668d6
* mail/hashcash.el (declare-function): Remove duplicate definition.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Wed, 17 Mar 2010 23:21:21 -0700 |
parents | 1d1d5d9bd884 |
children | 8d09094063d0 |
comparison
equal
deleted
inserted
replaced
107412:dcd02d810e03 | 107413:a21a1c5668d6 |
---|---|
1 ;;; hashcash.el --- Add hashcash payments to email | 1 ;;; hashcash.el --- Add hashcash payments to email |
2 | 2 |
3 ;; Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation | 3 ;; Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010 |
4 ;; Free Software Foundation | |
4 | 5 |
5 ;; Written by: Paul Foley <mycroft@actrix.gen.nz> (1997-2002) | 6 ;; Written by: Paul Foley <mycroft@actrix.gen.nz> (1997-2002) |
6 ;; Maintainer: Paul Foley <mycroft@actrix.gen.nz> | 7 ;; Maintainer: Paul Foley <mycroft@actrix.gen.nz> |
7 ;; Keywords: mail, hashcash | 8 ;; Keywords: mail, hashcash |
8 | 9 |
113 "Alist of asynchronous hashcash processes and buffers.") | 114 "Alist of asynchronous hashcash processes and buffers.") |
114 | 115 |
115 (require 'mail-utils) | 116 (require 'mail-utils) |
116 | 117 |
117 (eval-and-compile | 118 (eval-and-compile |
118 (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))) | |
119 | |
120 (if (fboundp 'point-at-bol) | 119 (if (fboundp 'point-at-bol) |
121 (defalias 'hashcash-point-at-bol 'point-at-bol) | 120 (defalias 'hashcash-point-at-bol 'point-at-bol) |
122 (defalias 'hashcash-point-at-bol 'line-beginning-position)) | 121 (defalias 'hashcash-point-at-bol 'line-beginning-position)) |
123 | 122 |
124 (if (fboundp 'point-at-eol) | 123 (if (fboundp 'point-at-eol) |
129 (setq addr (mail-strip-quoted-names addr)) | 128 (setq addr (mail-strip-quoted-names addr)) |
130 (if (and addr (string-match "\\`\\([^+@]+\\)\\+[^@]*\\(@.+\\)" addr)) | 129 (if (and addr (string-match "\\`\\([^+@]+\\)\\+[^@]*\\(@.+\\)" addr)) |
131 (concat (match-string 1 addr) (match-string 2 addr)) | 130 (concat (match-string 1 addr) (match-string 2 addr)) |
132 addr)) | 131 addr)) |
133 | 132 |
134 (declare-function message-narrow-to-headers-or-head "message" ()) | 133 (declare-function message-narrow-to-headers-or-head "message" ()) |
135 (declare-function message-fetch-field "message" (header &optional not-all)) | 134 (declare-function message-fetch-field "message" (header &optional not-all)) |
136 (declare-function message-goto-eoh "message" ()) | 135 (declare-function message-goto-eoh "message" ()) |
137 (declare-function message-narrow-to-headers "message" ()) | 136 (declare-function message-narrow-to-headers "message" ()) |
138 | 137 |
139 (defun hashcash-token-substring () | 138 (defun hashcash-token-substring () |
140 (save-excursion | 139 (save-excursion |
141 (let ((token "")) | 140 (let ((token "")) |
142 (loop | 141 (loop |
285 | 284 |
286 (defun hashcash-wait-or-cancel () | 285 (defun hashcash-wait-or-cancel () |
287 "Ask user whether to wait for hashcash processes to finish." | 286 "Ask user whether to wait for hashcash processes to finish." |
288 (interactive) | 287 (interactive) |
289 (when (hashcash-processes-running-p (current-buffer)) | 288 (when (hashcash-processes-running-p (current-buffer)) |
290 (if (y-or-n-p | 289 (if (y-or-n-p |
291 "Hashcash process(es) still running; wait for them to finish? ") | 290 "Hashcash process(es) still running; wait for them to finish? ") |
292 (hashcash-wait-async) | 291 (hashcash-wait-async) |
293 (hashcash-cancel-async)))) | 292 (hashcash-cancel-async)))) |
294 | 293 |
295 ;;;###autoload | 294 ;;;###autoload |