From: yamaoka Date: Tue, 4 Jun 2002 01:44:33 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_7-01-quimby~2 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c8ac307616d3210c4ccce3718d2b7bd5b510328;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6a26bb0..07c152e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2002-06-04 Katsumi Yamaoka + + * spam.el (spam-point-at-eol): New alias. + (spam-parse-whitelist): Use it. + 2002-06-03 Simon Josefsson * nnmail.el (nnmail-mail-splitting-decodes): New variable. diff --git a/lisp/spam.el b/lisp/spam.el index 98a4151..17f487f 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -64,7 +64,7 @@ "The location of the whitelist. The file format is one regular expression per line. The regular expression is matched against the address.") - + (defvar spam-blacklist (expand-file-name "blacklist" spam-directory) "The location of the blacklist. The file format is one regular expression per line. @@ -94,6 +94,11 @@ Optional arg BLACKLIST, if non-nil, means to enter in the blacklist instead." (interactive "sAddress: ") (spam-enter-whitelist address t)) +(eval-and-compile + (defalias 'spam-point-at-eol (if (fboundp 'point-at-eol) + 'point-at-eol + 'line-end-position))) + (defun spam-parse-whitelist (&optional blacklist) (let ((file (if blacklist spam-blacklist spam-whitelist)) contents address) @@ -101,7 +106,7 @@ Optional arg BLACKLIST, if non-nil, means to enter in the blacklist instead." (with-temp-buffer (insert-file-contents file) (while (not (eobp)) - (setq address (buffer-substring (point) (point-at-eol))) + (setq address (buffer-substring (point) (spam-point-at-eol))) (forward-line 1) (unless (zerop (length address)) (setq address (regexp-quote address))