From: yamaoka Date: Fri, 18 Oct 2002 01:49:46 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_8-05-quimby~29 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7541ace3bc119347ce3fe09e7175f9ea661c7f2d;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 36f7dcc..5922530 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2002-10-18 Katsumi Yamaoka + + * spam.el: Wrap autoload settings for executable-find and + ifile-spam-filter with eval-and-compile. + (spam-display-buffer-contents): Remove. + (spam-bogofilter-score): Merge spam-display-buffer-contents. + +2002-10-17 Ted Zlatanov + + * spam.el (spam-display-buffer-contents): New function. + (spam-bogofilter-score): use spam-display-buffer-contents, patch + from Katsumi Yamaoka . + 2002-10-17 TSUCHIYA Masatoshi * nnheader.el (nnheader-parse-naked-head): New function. diff --git a/lisp/spam.el b/lisp/spam.el index e6a54f8..ea2643e 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -48,10 +48,13 @@ (file-error (defalias 'bbdb-search 'ignore)))) ;; autoload executable-find -(autoload 'executable-find "executable") +(eval-and-compile + ;; executable-find is not autoloaded in Emacs 20 + (autoload 'executable-find "executable")) ;; autoload ifile-spam-filter -(autoload 'ifile-spam-filter "ifile-gnus") +(eval-and-compile + (autoload 'ifile-spam-filter "ifile-gnus")) ;;; Main parameters. @@ -342,6 +345,7 @@ The regular expression is matched against the address.") (setq found t cache nil))) found)) + ;;;; Training via Bogofilter. Last updated 2002-09-02. @@ -467,11 +471,16 @@ spamicity coefficient of each, and the overall article spamicity." (interactive) (when (and spam-use-bogofilter spam-bogofilter-path) (spam-bogofilter-articles nil "-v" (list (gnus-summary-article-number))) - (save-excursion - (set-buffer spam-output-buffer-name) - (unless (= (point-min) (point-max)) - (display-message-or-buffer (current-buffer) - spam-output-buffer-name))))) + (with-current-buffer spam-output-buffer-name + (unless (zerop (buffer-size)) + (if (<= (count-lines (point-min) (point-max)) 1) + (progn + (goto-char (point-max)) + (when (bolp) + (backward-char 1)) + (message "%s" (buffer-substring (point-min) (point)))) + (goto-char (point-min)) + (display-buffer (current-buffer))))))) (defun spam-bogofilter-register-routine () (when (and spam-use-bogofilter spam-bogofilter-path)