From: yamaoka Date: Thu, 16 Jan 2003 12:02:32 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_14-00-quimby~17 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32160edecb0db71ff3874f7a5d08b2a6ac895ffa;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e3888a6..02a7d6e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2003-01-16 Teodor Zlatanov + + * spam.el (spam-get-article-as-filename): new function (unused for now) + (spam-get-article-as-buffer): new function + (spam-get-article-as-string): use spam-get-article-as-buffer + (spam-summary-prepare-exit): fixed bug, noticed by Malcolm Purvis + 2003-01-15 ShengHuo ZHU * gnus-agent.el: Don't use `path'. diff --git a/lisp/spam.el b/lisp/spam.el index 8eb5306..493b26e 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -306,7 +306,7 @@ your main source of newsgroup names." (when (spam-group-spam-processor-stat-p gnus-newsgroup-name) (spam-stat-register-spam-routine)) - (when (spam-group-spam-processor-bogofilter-p gnus-newsgroup-name) + (when (spam-group-spam-processor-blacklist-p gnus-newsgroup-name) (spam-blacklist-register-routine)) (if spam-move-spam-nonspam-groups-only @@ -409,14 +409,31 @@ your main source of newsgroup names." 'line-end-position))) (defun spam-get-article-as-string (article) - (let ((article-string)) + (let ((article-buffer (spam-get-article-as-buffer article)) + article-string) + (when article-buffer + (save-window-excursion + (set-buffer article-buffer) + (setq article-string (buffer-string)))) + article-string)) + +(defun spam-get-article-as-buffer (article) + (let ((article-buffer)) (when (numberp article) (save-window-excursion (gnus-summary-goto-subject article) (gnus-summary-show-article t) - (set-buffer gnus-article-buffer) - (setq article-string (buffer-string)))) - article-string)) + (setq article-buffer (get-buffer gnus-article-buffer)))) + article-buffer)) + +(defun spam-get-article-as-filename (article) + (let ((article-filename)) + (when (numberp article) + (nnml-possibly-change-directory (gnus-group-real-name gnus-newsgroup-name)) + (setq article-filename (expand-file-name (int-to-string article) nnml-current-directory))) + (if (file-exists-p article-filename) + article-filename + nil))) (defun spam-fetch-field-from-fast (article) "Fetch the `from' field quickly, using the internal gnus-data-list function"