(hashcash-insert-payment-async-2): Use
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 15 Apr 2006 13:03:43 +0000 (13:03 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 15 Apr 2006 13:03:43 +0000 (13:03 +0000)
message-goto-eoh instead of doing it manually.
(mail-add-payment): Use message-narrow-to-header instead of trying
to do the same itself.

lisp/ChangeLog
lisp/hashcash.el

index 2baba58..dc127ee 100644 (file)
@@ -1,5 +1,10 @@
 2006-04-15  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * hashcash.el (hashcash-insert-payment-async-2): Use
+       message-goto-eoh instead of doing it manually.
+       (mail-add-payment): Use message-narrow-to-header instead of trying
+       to do the same itself.
+
        * message.el (message-hidden-headers): Add Face.
 
        * gnus-sum.el (gnus-summary-reparent-thread): Factor out
index ac2e4a4..af76646 100644 (file)
@@ -246,9 +246,7 @@ Only start calculation.  Results are inserted when ready."
        (setq hashcash-process-alist (delq
                                      (assq process hashcash-process-alist)
                                      hashcash-process-alist))
-       (goto-char (point-min))
-       (search-forward mail-header-separator)
-       (beginning-of-line)
+       (message-goto-eoh)
        (when pay
 ;;      (insert-before-markers "X-Payment: hashcash "
 ;;                          (number-to-string (hashcash-version pay)) " "
@@ -318,10 +316,7 @@ Set ASYNC to t to start asynchronous calculation.  (See
        (addrlist nil))
     (save-excursion
       (save-restriction
-       (goto-char (point-min))
-       (search-forward mail-header-separator)
-       (beginning-of-line)
-       (narrow-to-region (point-min) (point))
+       (message-narrow-to-headers)
        (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"