projects
/
gnus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pop3.el (pop3-open-server, pop3-read-response, pop3-list, pop3-retr, pop3-quit):...
[gnus]
/
lisp
/
spam.el
diff --git
a/lisp/spam.el
b/lisp/spam.el
index
c315f2f
..
b7908e5
100644
(file)
--- a/
lisp/spam.el
+++ b/
lisp/spam.el
@@
-1,6
+1,6
@@
;;; spam.el --- Identifying spam
;;; 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>
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
@@
-371,6
+371,7
@@
Only meaningful if you enable `spam-use-blackholes'."
:group 'spam)
;; backward-compatibility alias
(put 'spam-face 'face-alias 'spam)
:group 'spam)
;; backward-compatibility alias
(put 'spam-face 'face-alias 'spam)
+(put 'spam-face 'obsolete-face "22.1")
(defcustom spam-face 'spam
"Face for spam-marked articles."
(defcustom spam-face 'spam
"Face for spam-marked articles."
@@
-413,16
+414,16
@@
Only meaningful if you enable `spam-use-regex-body'."
"Spam ifile configuration."
:group 'spam)
"Spam ifile configuration."
:group 'spam)
-(make-obsolete-variable 'spam-ifile-path 'spam-ifile-program
)
-;; "22.1" ;; Gnus 5.10.9
+(make-obsolete-variable 'spam-ifile-path 'spam-ifile-program
+ "Gnus 5.10.9 (Emacs 22.1)")
(defcustom spam-ifile-program (executable-find "ifile")
"Name of the ifile program."
:type '(choice (file :tag "Location of ifile")
(const :tag "ifile is not installed"))
:group 'spam-ifile)
(defcustom spam-ifile-program (executable-find "ifile")
"Name of the ifile program."
:type '(choice (file :tag "Location of ifile")
(const :tag "ifile is not installed"))
:group 'spam-ifile)
-(make-obsolete-variable 'spam-ifile-database-path 'spam-ifile-database
)
-;; "22.1" ;; Gnus 5.10.9
+(make-obsolete-variable 'spam-ifile-database-path 'spam-ifile-database
+ "Gnus 5.10.9 (Emacs 22.1)")
(defcustom spam-ifile-database nil
"File name of the ifile database."
:type '(choice (file :tag "Location of the ifile database")
(defcustom spam-ifile-database nil
"File name of the ifile database."
:type '(choice (file :tag "Location of the ifile database")
@@
-452,8
+453,8
@@
your main source of newsgroup names."
"Spam bogofilter configuration."
:group 'spam)
"Spam bogofilter configuration."
:group 'spam)
-(make-obsolete-variable 'spam-bogofilter-path 'spam-bogofilter-program
)
-;; "22.1" ;; Gnus 5.10.9
+(make-obsolete-variable 'spam-bogofilter-path 'spam-bogofilter-program
+ "Gnus 5.10.9 (Emacs 22.1)")
(defcustom spam-bogofilter-program (executable-find "bogofilter")
"Name of the Bogofilter program."
:type '(choice (file :tag "Location of bogofilter")
(defcustom spam-bogofilter-program (executable-find "bogofilter")
"Name of the Bogofilter program."
:type '(choice (file :tag "Location of bogofilter")
@@
-504,8
+505,8
@@
When nil, use the default location."
"Spam bsfilter configuration."
:group 'spam)
"Spam bsfilter configuration."
:group 'spam)
-(make-obsolete-variable 'spam-bsfilter-path 'spam-bsfilter-program
)
-;; "22.1" ;; Gnus 5.10.9
+(make-obsolete-variable 'spam-bsfilter-path 'spam-bsfilter-program
+ "Gnus 5.10.9 (Emacs 22.1)")
(defcustom spam-bsfilter-program (executable-find "bsfilter")
"Name of the Bsfilter program."
:type '(choice (file :tag "Location of bsfilter")
(defcustom spam-bsfilter-program (executable-find "bsfilter")
"Name of the Bsfilter program."
:type '(choice (file :tag "Location of bsfilter")
@@
-571,7
+572,7
@@
When nil, use the default spamoracle database."
:group 'spam)
(make-obsolete-variable 'spam-spamassassin-path
:group 'spam)
(make-obsolete-variable 'spam-spamassassin-path
- 'spam-spamassassin-program
) ;; "22.1" ;; Gnus 5.10.9
+ 'spam-spamassassin-program
"Gnus 5.10.9 (Emacs 22.1)")
(defcustom spam-assassin-program (executable-find "spamassassin")
"Name of the spamassassin program.
Hint: set this to \"spamc\" if you have spamd running. See the spamc and
(defcustom spam-assassin-program (executable-find "spamassassin")
"Name of the spamassassin program.
Hint: set this to \"spamc\" if you have spamd running. See the spamc and
@@
-602,8
+603,8
@@
identification"
:type 'string
:group 'spam-spamassassin)
:type 'string
:group 'spam-spamassassin)
-(make-obsolete-variable 'spam-sa-learn-path 'spam-sa-learn-program
)
-;; "22.1" ;; Gnus 5.10.9
+(make-obsolete-variable 'spam-sa-learn-path 'spam-sa-learn-program
+ "Gnus 5.10.9 (Emacs 22.1)")
(defcustom spam-sa-learn-program (executable-find "sa-learn")
"Name of the sa-learn program."
:type '(choice (file :tag "Location of spamassassin")
(defcustom spam-sa-learn-program (executable-find "sa-learn")
"Name of the sa-learn program."
:type '(choice (file :tag "Location of spamassassin")
@@
-659,12
+660,12
@@
order for SpamAssassin to recognize the new registered spam."
:type 'string
:group 'spam-crm114)
: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)
"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)
"The switch that CRM114 Mailfilter uses to unregister spam messages."
:type 'string
:group 'spam-crm114)
@@
-1151,10
+1152,8
@@
backends)."
'spam-check-crm114
'spam-crm114-register-ham-routine
'spam-crm114-register-spam-routine
'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
;;}}}
;;{{{ scoring and summary formatting
@@
-1606,8
+1605,7
@@
to find it out)."
article))))
(defun spam-fetch-article-header (article)
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))))
;;}}}
(gnus-read-header article)
(nth 3 (assq article gnus-newsgroup-data))))
;;}}}
@@
-2173,8
+2171,7
@@
See `spam-ifile-database'."
(with-temp-buffer
(let ((temp-buffer-name (buffer-name))
(db-param (spam-get-ifile-database-parameter)))
(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"
(apply 'call-process-region
(point-min) (point-max) spam-ifile-program
nil temp-buffer-name nil "-c"
@@
-2319,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))
;; 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))
(dolist (a addresses)
(when (stringp a)
(goto-char (point-min))
@@
-2522,8
+2518,7
@@
With a non-nil REMOVE, remove the ADDRESSES."
return)
(with-temp-buffer
(let ((temp-buffer-name (buffer-name)))
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
(apply 'call-process-region
(point-min) (point-max)
spam-bogofilter-program
@@
-2580,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)))
(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 ((status
(apply 'call-process-region
(point-min) (point-max)
@@
-2657,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)))
(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))
(apply 'call-process-region
(point-min) (point-max) spam-assassin-program
nil temp-buffer-name nil spam-spamassassin-arguments))
@@
-2692,8
+2685,7
@@
With a non-nil REMOVE, remove the ADDRESSES."
;; group the articles into mbox format
(dolist (article articles)
(let (article-string)
;; 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
(setq article-string (spam-get-article-as-string article)))
(when (stringp article-string)
(insert "From \n") ; mbox separator (sa-learn only checks the
@@
-2756,8
+2748,7
@@
With a non-nil REMOVE, remove the ADDRESSES."
return)
(with-temp-buffer
(let ((temp-buffer-name (buffer-name)))
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
(apply 'call-process-region
(point-min) (point-max)
spam-bsfilter-program
@@
-2842,8
+2833,7
@@
With a non-nil REMOVE, remove the ADDRESSES."
return)
(with-temp-buffer
(let ((temp-buffer-name (buffer-name)))
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
(apply 'call-process-region
(point-min) (point-max)
spam-crm114-program
@@
-2942,5
+2932,4
@@
installed through `spam-necessary-extra-headers'."
(provide 'spam)
(provide 'spam)
-;; arch-tag: 07e6e0ca-ab0a-4412-b445-1f6c72a4f27f
;;; spam.el ends here
;;; spam.el ends here