(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))
-
- (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))
(if (and addr (string-match "\\`\\([^+@]+\\)\\+[^@]*\\(@.+\\)" addr))
(let ((token ""))
(cl-loop
(setq token
- (concat token (buffer-substring (point) (hashcash-point-at-eol))))
- (goto-char (hashcash-point-at-eol))
+ (concat token (buffer-substring (point) (line-end-position))))
+ (goto-char (line-end-position))
(forward-char 1)
(unless (looking-at "[ \t]") (cl-return token))
(while (looking-at "[ \t]") (forward-char 1))))))
(message "Payment valid"))
ok))))
+(define-obsolete-function-alias 'hashcash-point-at-bol #'line-beginning-position "28.1")
+(define-obsolete-function-alias 'hashcash-point-at-eol #'line-end-position "28.1")
+
(provide 'hashcash)
;;; hashcash.el ends here