X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fspam.el;h=b7908e5507bee29f10abfe1241fcfc52b80c3c66;hb=8339220cc25db3fbdab4367d6252e596bddd9cb1;hp=2d2fafa3fdc6804c020bb692ac9775986a627535;hpb=2a7fa71aba0499808ad9fe57a1b8593b69eee397;p=gnus diff --git a/lisp/spam.el b/lisp/spam.el index 2d2fafa3f..b7908e550 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -1,6 +1,6 @@ ;;; spam.el --- Identifying spam -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -660,12 +660,12 @@ order for SpamAssassin to recognize the new registered spam." :type 'string :group 'spam-crm114) -(defcustom spam-crm114-spam-strong-switch "--UNKNOWN" +(defcustom spam-crm114-spam-strong-switch "--unlearn" "The switch that CRM114 Mailfilter uses to unregister ham messages." :type 'string :group 'spam-crm114) -(defcustom spam-crm114-ham-strong-switch "--UNKNOWN" +(defcustom spam-crm114-ham-strong-switch "--unlearn" "The switch that CRM114 Mailfilter uses to unregister spam messages." :type 'string :group 'spam-crm114) @@ -1152,10 +1152,8 @@ backends)." 'spam-check-crm114 'spam-crm114-register-ham-routine 'spam-crm114-register-spam-routine - ;; does CRM114 Mailfilter support unregistration? - nil - nil) - + 'spam-crm114-unregister-ham-routine + 'spam-crm114-unregister-spam-routine) ;;}}} ;;{{{ scoring and summary formatting @@ -1607,8 +1605,7 @@ to find it out)." article)))) (defun spam-fetch-article-header (article) - (save-excursion - (set-buffer gnus-summary-buffer) + (with-current-buffer gnus-summary-buffer (gnus-read-header article) (nth 3 (assq article gnus-newsgroup-data)))) ;;}}} @@ -2174,8 +2171,7 @@ See `spam-ifile-database'." (with-temp-buffer (let ((temp-buffer-name (buffer-name)) (db-param (spam-get-ifile-database-parameter))) - (save-excursion - (set-buffer article-buffer-name) + (with-current-buffer article-buffer-name (apply 'call-process-region (point-min) (point-max) spam-ifile-program nil temp-buffer-name nil "-c" @@ -2320,9 +2316,8 @@ With a non-nil REMOVE, remove the ADDRESSES." ;; else, we have a list of addresses here (unless (file-exists-p (file-name-directory file)) (make-directory (file-name-directory file) t)) - (save-excursion - (set-buffer - (find-file-noselect file)) + (with-current-buffer + (find-file-noselect file) (dolist (a addresses) (when (stringp a) (goto-char (point-min)) @@ -2523,8 +2518,7 @@ With a non-nil REMOVE, remove the ADDRESSES." return) (with-temp-buffer (let ((temp-buffer-name (buffer-name))) - (save-excursion - (set-buffer article-buffer-name) + (with-current-buffer article-buffer-name (apply 'call-process-region (point-min) (point-max) spam-bogofilter-program @@ -2581,8 +2575,7 @@ With a non-nil REMOVE, remove the ADDRESSES." (let ((article-buffer-name (buffer-name))) (with-temp-buffer (let ((temp-buffer-name (buffer-name))) - (save-excursion - (set-buffer article-buffer-name) + (with-current-buffer article-buffer-name (let ((status (apply 'call-process-region (point-min) (point-max) @@ -2658,8 +2651,7 @@ With a non-nil REMOVE, remove the ADDRESSES." (let ((article-buffer-name (buffer-name))) (with-temp-buffer (let ((temp-buffer-name (buffer-name))) - (save-excursion - (set-buffer article-buffer-name) + (with-current-buffer article-buffer-name (apply 'call-process-region (point-min) (point-max) spam-assassin-program nil temp-buffer-name nil spam-spamassassin-arguments)) @@ -2693,8 +2685,7 @@ With a non-nil REMOVE, remove the ADDRESSES." ;; group the articles into mbox format (dolist (article articles) (let (article-string) - (save-excursion - (set-buffer summary-buffer-name) + (with-current-buffer summary-buffer-name (setq article-string (spam-get-article-as-string article))) (when (stringp article-string) (insert "From \n") ; mbox separator (sa-learn only checks the @@ -2757,8 +2748,7 @@ With a non-nil REMOVE, remove the ADDRESSES." return) (with-temp-buffer (let ((temp-buffer-name (buffer-name))) - (save-excursion - (set-buffer article-buffer-name) + (with-current-buffer article-buffer-name (apply 'call-process-region (point-min) (point-max) spam-bsfilter-program @@ -2843,8 +2833,7 @@ With a non-nil REMOVE, remove the ADDRESSES." return) (with-temp-buffer (let ((temp-buffer-name (buffer-name))) - (save-excursion - (set-buffer article-buffer-name) + (with-current-buffer article-buffer-name (apply 'call-process-region (point-min) (point-max) spam-crm114-program @@ -2943,5 +2932,4 @@ installed through `spam-necessary-extra-headers'." (provide 'spam) -;; arch-tag: 07e6e0ca-ab0a-4412-b445-1f6c72a4f27f ;;; spam.el ends here