;;; 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 <larsi@gnus.org>
: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)
'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
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))))
;;}}}
(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"
;; 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))
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
(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)
(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))
;; 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
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
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
(provide 'spam)
-;; arch-tag: 07e6e0ca-ab0a-4412-b445-1f6c72a4f27f
;;; spam.el ends here