;;; hashcash.el --- Add hashcash payments to email
-;; $Revision: 1.1.2.4 $
;; Copyright (C) 1997,2001 Paul E. Foley
;; Maintainer: Paul Foley <mycroft@actrix.gen.nz>
the value of hashcash payment to be made to that user. STRING, if
present, is the string to be hashed; if not present ADDR will be used.")
-(defcustom hashcash "hashcash"
+(defcustom hashcash "/usr/local/bin/hashcash"
"*The path to the hashcash binary.")
+(defcustom hashcash-in-news nil
+ "*Specifies whether or not hashcash payments should be made to newsgroups."
+ :type 'boolean)
+
(require 'mail-utils)
(defun hashcash-strip-quoted-names (addr)
(narrow-to-region (point-min) (point))
(let ((to (hashcash-strip-quoted-names (mail-fetch-field "To" nil t)))
(cc (hashcash-strip-quoted-names (mail-fetch-field "Cc" nil t)))
- (ng (hashcash-strip-quoted-names
- (mail-fetch-field "Newsgroups" nil t))))
+ (ng (hashcash-strip-quoted-names (mail-fetch-field "Newsgroups"
+ nil t))))
(when to
(setq addrlist (split-string to ",[ \t\n]*")))
(when cc
(setq addrlist (nconc addrlist (split-string cc ",[ \t\n]*"))))
- (when ng
+ (when (and hashcash-in-news ng)
(setq addrlist (nconc addrlist (split-string ng ",[ \t\n]*")))))
(while addrlist
(hashcash-insert-payment (pop addrlist))))))
+2002-08-14 Simon Josefsson <jas@extundo.com>
+
+ * gnus-art.el (gnus-button-alist): Use ' not ` for default value
+ quoting.
+ (gnus-button-alist): Fix doc.
+ (gnus-header-button-alist): Use ' not ` for default value quoting.
+ (gnus-header-button-alist): Don't inline gnus-button-url-regexp,
+ rationale similar to 2002-05-01 change.
+ (gnus-article-add-buttons-to-head): Evaluate expression.
+
+ * gnus-sum.el (gnus-summary-make-menu-bar): Add MIME button option.
+
2002-08-14 Katsumi Yamaoka <yamaoka@jpl.org>
* message.el (message-font-lock-keywords): Refer to the value for
:type 'regexp)
(defcustom gnus-button-alist
- `(("<\\(url:[>\n\t ]*?\\)?\\(nntp\\|news\\):[>\n\t ]*\\([^>\n\t ]*@[^>\n\t ]*\\)>"
+ '(("<\\(url:[>\n\t ]*?\\)?\\(nntp\\|news\\):[>\n\t ]*\\([^>\n\t ]*@[^>\n\t ]*\\)>"
0 t gnus-button-handle-news 3)
("\\b\\(nntp\\|news\\):\\([^>\n\t ]*@[^>)!;:,\n\t ]*\\)" 0 t
gnus-button-handle-news 2)
"*Alist of regexps matching buttons in article bodies.
Each entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where
-REGEXP: is the string matching text around the button,
+REGEXP: is the string matching text around the button (can also be lisp
+expression evaluating to a string),
BUTTON: is the number of the regexp grouping actually matching the button,
FORM: is a lisp expression which must eval to true for the button to
be added,
(integer :tag "Regexp group")))))
(defcustom gnus-header-button-alist
- `(("^\\(References\\|Message-I[Dd]\\):" "<[^<>]+>"
+ '(("^\\(References\\|Message-I[Dd]\\):" "<[^<>]+>"
0 t gnus-button-message-id 0)
("^\\(From\\|Reply-To\\):" ": *\\(.+\\)$" 1 t gnus-button-reply 1)
("^\\(Cc\\|To\\):" "[^ \t\n<>,()\"]+@[^ \t\n<>,()\"]+"
0 t gnus-button-mailto 0)
- ("^X-[Uu][Rr][Ll]:" ,gnus-button-url-regexp 0 t browse-url 0)
- ("^Subject:" ,gnus-button-url-regexp 0 t browse-url 0)
- ("^[^:]+:" ,gnus-button-url-regexp 0 t browse-url 0)
+ ("^X-[Uu][Rr][Ll]:" gnus-button-url-regexp 0 t browse-url 0)
+ ("^Subject:" gnus-button-url-regexp 0 t browse-url 0)
+ ("^[^:]+:" gnus-button-url-regexp 0 t browse-url 0)
("^[^:]+:" "\\bmailto:\\([-a-zA-Z.@_+0-9%=?]+\\)" 0 t gnus-url-mailto 1)
("^[^:]+:" "\\(<\\(url: \\)?news:\\([^>\n ]*\\)>\\)" 1 t
gnus-button-message-id 3))
(match-beginning 0))
(point-max)))
(goto-char beg)
- (while (re-search-forward (nth 1 entry) end t)
+ (while (re-search-forward (eval (nth 1 entry)) end t)
;; Each match within a header.
(let* ((entry (cdr entry))
(start (match-beginning (nth 1 entry)))