1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00

Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716

Merge from gnus--rel--5.10

Patches applied:

 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-74
   Update from CVS

2004-12-02  Katsumi Yamaoka  <yamaoka@jpl.org>

   * lisp/gnus/message.el (message-forward-make-body-mml): Remove headers
   according to message-forward-ignored-headers if a message is
   decoded.

2004-12-02  Romain Francoise  <romain@orebokech.com>

   * lisp/gnus/message.el (message-forward-make-body-plain): Always remove
   headers according to message-forward-ignored-headers.

2004-11-26  Katsumi Yamaoka  <yamaoka@jpl.org>

   * lisp/gnus/lpath.el: Remove bbdb-create-internal, bbdb-records,
   spam-BBDB-register-routine and spam-enter-ham-BBDB.

   * lisp/gnus/nnrss.el (nnrss-string-as-multibyte): Redefine it as a macro in
   order to silence the byte compiler.

   * lisp/gnus/pop3.el (pop3-md5): Define it before being used.

   * lisp/gnus/spam.el: Fix the way to silence the byte compiler, which
   complained about bbdb-buffer, bbdb-create-internal,
   bbdb-search-simple, mail-check-payment, spam-BBDB-register-routine,
   spam-enter-ham-BBDB, spam-stat-buffer-change-to-non-spam,
   spam-stat-buffer-change-to-spam, spam-stat-buffer-is-non-spam,
   spam-stat-buffer-is-spam, spam-stat-load,
   spam-stat-register-ham-routine, spam-stat-register-spam-routine,
   spam-stat-save and spam-stat-split-fancy.

2004-11-26  Katsumi Yamaoka  <yamaoka@jpl.org>

   * lisp/gnus/canlock.el (canlock-password): Remove `:size 0' or `:size 1'
   which may confuse users.
   (canlock-password-for-verify): Ditto.

   * lisp/gnus/deuglify.el (gnus-outlook-deuglify-unwrap-stop-chars): Ditto.

   * lisp/gnus/gnus-art.el (gnus-emphasis-alist): Ditto.

   * lisp/gnus/gnus-registry.el (gnus-registry-max-entries): Ditto.

   * lisp/gnus/gnus-score.el (gnus-adaptive-word-length-limit): Ditto.

   * lisp/gnus/gnus-start.el (gnus-save-killed-list): Ditto.

   * lisp/gnus/gnus-sum.el (gnus-thread-hide-subtree): Ditto.
   (gnus-sum-thread-tree-root): Ditto.
   (gnus-sum-thread-tree-false-root): Ditto.
   (gnus-sum-thread-tree-single-indent): Ditto.

   * lisp/gnus/message.el (message-courtesy-message): Ditto.
   (message-archive-note): Ditto.
   (message-subscribed-address-file): Ditto.
   (message-user-fqdn): Ditto.

   * lisp/gnus/spam-report.el (spam-report-gmane-regex): Ditto.

   * lisp/gnus/spam.el (spam-blackhole-good-server-regex): Ditto.

2004-11-25  Reiner Steib  <Reiner.Steib@gmx.de>

   * lisp/gnus/message.el (message-forbidden-properties): Fixed typo in doc
   string.

2004-11-25  Lars Magne Ingebrigtsen  <larsi@gnus.org>

   * lisp/gnus/message.el (message-strip-forbidden-properties): Bind
   buffer-read-only (etc) to nil.

2004-11-25  Reiner Steib  <Reiner.Steib@gmx.de>

   * lisp/gnus/gnus-util.el (gnus-replace-in-string): Added doc string.

   * lisp/gnus/nnmail.el (nnmail-split-header-length-limit): Increase to 2048
   to avoid problems when splitting mails with many recipients.

2004-11-23  Katsumi Yamaoka  <yamaoka@jpl.org>

   * lisp/gnus/rfc2047.el (rfc2047-header-encoding-alist): Add In-Reply-To to
   address-mime.  Suggested by ARISAWA Akihiro <ari@mbf.ocn.ne.jp>.

2004-11-22  Marek Martin  <marek.martin@mum.pri.ee>  (tiny change)

   * lisp/gnus/nnfolder.el (nnfolder-request-create-group): Save current buffer.

2004-11-22  Reiner Steib  <Reiner.Steib@gmx.de>

   * man/message.texi (Various Message Variables): Mention that all mail
   file variables are derived from `message-directory'.

   * man/gnus.texi (Splitting Mail): Clarify bogus group.

2004-11-16  Reiner Steib  <Reiner.Steib@gmx.de>

   * man/gnus.texi (Filtering Spam Using The Spam ELisp Package):
This commit is contained in:
Miles Bader 2004-12-07 21:56:42 +00:00
parent e9962ae153
commit ad136a7c3b
20 changed files with 289 additions and 179 deletions

View file

@ -1,3 +1,89 @@
2004-12-02 Katsumi Yamaoka <yamaoka@jpl.org>
* message.el (message-forward-make-body-mml): Remove headers
according to message-forward-ignored-headers if a message is
decoded.
2004-12-02 Romain Francoise <romain@orebokech.com>
* message.el (message-forward-make-body-plain): Always remove
headers according to message-forward-ignored-headers.
2004-11-26 Katsumi Yamaoka <yamaoka@jpl.org>
* lpath.el: Remove bbdb-create-internal, bbdb-records,
spam-BBDB-register-routine and spam-enter-ham-BBDB.
* nnrss.el (nnrss-string-as-multibyte): Redefine it as a macro in
order to silence the byte compiler.
* pop3.el (pop3-md5): Define it before being used.
* spam.el: Fix the way to silence the byte compiler, which
complained about bbdb-buffer, bbdb-create-internal,
bbdb-search-simple, mail-check-payment, spam-BBDB-register-routine,
spam-enter-ham-BBDB, spam-stat-buffer-change-to-non-spam,
spam-stat-buffer-change-to-spam, spam-stat-buffer-is-non-spam,
spam-stat-buffer-is-spam, spam-stat-load,
spam-stat-register-ham-routine, spam-stat-register-spam-routine,
spam-stat-save and spam-stat-split-fancy.
2004-11-26 Katsumi Yamaoka <yamaoka@jpl.org>
* canlock.el (canlock-password): Remove `:size 0' or `:size 1'
which may confuse users.
(canlock-password-for-verify): Ditto.
* deuglify.el (gnus-outlook-deuglify-unwrap-stop-chars): Ditto.
* gnus-art.el (gnus-emphasis-alist): Ditto.
* gnus-registry.el (gnus-registry-max-entries): Ditto.
* gnus-score.el (gnus-adaptive-word-length-limit): Ditto.
* gnus-start.el (gnus-save-killed-list): Ditto.
* gnus-sum.el (gnus-thread-hide-subtree): Ditto.
(gnus-sum-thread-tree-root): Ditto.
(gnus-sum-thread-tree-false-root): Ditto.
(gnus-sum-thread-tree-single-indent): Ditto.
* message.el (message-courtesy-message): Ditto.
(message-archive-note): Ditto.
(message-subscribed-address-file): Ditto.
(message-user-fqdn): Ditto.
* spam-report.el (spam-report-gmane-regex): Ditto.
* spam.el (spam-blackhole-good-server-regex): Ditto.
2004-11-25 Reiner Steib <Reiner.Steib@gmx.de>
* message.el (message-forbidden-properties): Fixed typo in doc
string.
2004-11-25 Lars Magne Ingebrigtsen <larsi@gnus.org>
* message.el (message-strip-forbidden-properties): Bind
buffer-read-only (etc) to nil.
2004-11-25 Reiner Steib <Reiner.Steib@gmx.de>
* gnus-util.el (gnus-replace-in-string): Added doc string.
* nnmail.el (nnmail-split-header-length-limit): Increase to 2048
to avoid problems when splitting mails with many recipients.
2004-11-23 Katsumi Yamaoka <yamaoka@jpl.org>
* rfc2047.el (rfc2047-header-encoding-alist): Add In-Reply-To to
address-mime. Suggested by ARISAWA Akihiro <ari@mbf.ocn.ne.jp>.
2004-11-22 Marek Martin <marek.martin@mum.pri.ee> (tiny change)
* nnfolder.el (nnfolder-request-create-group): Save current buffer.
2004-11-22 Stefan Monnier <monnier@iro.umontreal.ca>
* gnus-sum.el (gnus-summary-exit): Remove redundant and harmful

View file

@ -55,13 +55,13 @@
(defcustom canlock-password nil
"Password to use when signing a Cancel-Lock or a Cancel-Key header."
:type '(radio (const :format "Not specified " nil)
(string :tag "Password" :size 0))
(string :tag "Password"))
:group 'canlock)
(defcustom canlock-password-for-verify canlock-password
"Password to use when verifying a Cancel-Lock or a Cancel-Key header."
:type '(radio (const :format "Not specified " nil)
(string :tag "Password" :size 0))
(string :tag "Password"))
:group 'canlock)
(defcustom canlock-force-insert-header nil

View file

@ -1,6 +1,6 @@
;;; deuglify.el --- deuglify broken Outlook (Express) articles
;; Copyright (C) 2002, 2003 Free Software Foundation, Inc.
;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
;; Copyright (C) 2001, 2002 Raymond Scholz
;; Author: Raymond Scholz <rscholz@zonix.de>
@ -257,7 +257,7 @@
"Characters that inhibit unwrapping if they are the last one on the cited line above the possible wrapped line."
:version "21.4"
:type '(radio (const :format "None " nil)
(string :size 0 :value ".?!"))
(string :value ".?!"))
:group 'gnus-outlook-deuglify)
(defcustom gnus-outlook-deuglify-no-wrap-chars "`"

View file

@ -399,15 +399,15 @@ is the face used for highlighting."
:value
(gnus-emphasis-custom-value-to-external value))))
(widget-group-value-create widget))
(regexp :format "%t: %v\n" :size 1)
(integer :format "Match group: %v\n" :size 0)
(integer :format "Emphasize group: %v\n" :size 0)
regexp
(integer :format "Match group: %v")
(integer :format "Emphasize group: %v")
face)
(group :tag "Simple"
:value (("_" . "_") nil default)
(cons :format "%v"
(regexp :format "Start regexp: %v\n" :size 0)
(regexp :format "End regexp: %v\n" :size 0))
(regexp :format "Start regexp: %v")
(regexp :format "End regexp: %v"))
(boolean :format "Show start and end patterns: %[%v%]\n"
:on " On " :off " Off ")
face)))

View file

@ -1,5 +1,5 @@
;;; gnus-registry.el --- article registry for Gnus
;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
;; Free Software Foundation, Inc.
;; Author: Ted Zlatanov <tzz@lifelogs.com>
@ -128,7 +128,7 @@ way."
"Maximum number of entries in the registry, nil for unlimited."
:group 'gnus-registry
:type '(radio (const :format "Unlimited " nil)
(integer :format "Maximum number: %v\n" :size 0)))
(integer :format "Maximum number: %v")))
;; Function(s) missing in Emacs 20
(when (memq nil (mapcar 'fboundp '(puthash)))

View file

@ -240,7 +240,7 @@ This variable allows the same syntax as `gnus-home-score-file'."
:version "21.4"
:group 'gnus-score-adapt
:type '(radio (const :format "Unlimited " nil)
(integer :format "Maximum length: %v\n" :size 0)))
(integer :format "Maximum length: %v")))
(defcustom gnus-ignored-adaptive-words nil
"List of words to be ignored when doing adaptive word scoring."

View file

@ -258,7 +258,7 @@ not match this regexp will be removed before saving the list."
(and value (not (stringp value))))
:value t)
(const nil)
(regexp :format "%t: %v\n" :size 0)))
regexp))
(defcustom gnus-ignored-newsgroups
(mapconcat 'identity

View file

@ -264,7 +264,7 @@ to expose hidden threads."
(not (or (consp value) (functionp value))))
:value t)
(const nil)
(sexp :tag "Predicate specifier" :size 0)))
(sexp :tag "Predicate specifier")))
(defcustom gnus-thread-hide-killed t
"*If non-nil, hide killed threads automatically."
@ -4639,19 +4639,19 @@ Unscored articles will be counted as having a score of zero."
"With %B spec, used for the root of a thread.
If nil, use subject instead."
:version "21.4"
:type '(radio (const :format "%v " nil) (string :size 0))
:type '(radio (const :format "%v " nil) string)
:group 'gnus-thread)
(defcustom gnus-sum-thread-tree-false-root "> "
"With %B spec, used for a false root of a thread.
If nil, use subject instead."
:version "21.4"
:type '(radio (const :format "%v " nil) (string :size 0))
:type '(radio (const :format "%v " nil) string)
:group 'gnus-thread)
(defcustom gnus-sum-thread-tree-single-indent ""
"With %B spec, used for a thread with just one message.
If nil, use subject instead."
:version "21.4"
:type '(radio (const :format "%v " nil) (string :size 0))
:type '(radio (const :format "%v " nil) string)
:group 'gnus-thread)
(defcustom gnus-sum-thread-tree-vertical "| "
"With %B spec, used for drawing a vertical line."

View file

@ -60,10 +60,20 @@
((fboundp 'replace-in-string)
(defalias 'gnus-replace-in-string 'replace-in-string))
((fboundp 'replace-regexp-in-string)
(defun gnus-replace-in-string (string regexp newtext &optional literal)
(defun gnus-replace-in-string (string regexp newtext &optional literal)
"Replace all matches for REGEXP with NEWTEXT in STRING.
If LITERAL is non-nil, insert NEWTEXT literally. Return a new
string containing the replacements.
This is a compatibility function for different Emacsen."
(replace-regexp-in-string regexp newtext string nil literal)))
(t
(defun gnus-replace-in-string (string regexp newtext &optional literal)
"Replace all matches for REGEXP with NEWTEXT in STRING.
If LITERAL is non-nil, insert NEWTEXT literally. Return a new
string containing the replacements.
This is a compatibility function for different Emacsen."
(let ((start 0) tail)
(while (string-match regexp string start)
(setq tail (- (length string) (match-end 0)))

View file

@ -146,7 +146,7 @@ If the string contains the format spec \"%s\", the Newsgroups
the article has been posted to will be inserted there.
If this variable is nil, no such courtesy message will be added."
:group 'message-sending
:type '(radio (string :format "%t: %v\n" :size 0) (const nil)))
:type '(radio string (const nil)))
(defcustom message-ignored-bounced-headers
"^\\(Received\\|Return-Path\\|Delivered-To\\):"
@ -373,8 +373,7 @@ Archives \(such as groups.google.com\) respect this header."
"Note to insert why you wouldn't want this posting archived.
If nil, don't insert any text in the body."
:version "21.4"
:type '(radio (string :format "%t: %v\n" :size 0)
(const nil))
:type '(radio string (const nil))
:link '(custom-manual "(message)Header Commands")
:group 'message-various)
@ -698,8 +697,7 @@ non-nil, each line of this file should be a mailing list address."
:version "21.4"
:group 'message-interface
:link '(custom-manual "(message)Mailing Lists")
:type '(radio (file :format "%t: %v\n" :size 0)
(const nil)))
:type '(radio file (const nil)))
(defcustom message-subscribed-addresses nil
"*Specifies a list of addresses the user is subscribed to.
@ -1442,7 +1440,7 @@ no, only reply back to the author."
:group 'message-headers
:link '(custom-manual "(message)News Headers")
:type '(radio (const :format "%v " nil)
(string :format "FQDN: %v\n" :size 0)))
(string :format "FQDN: %v")))
(defcustom message-use-idna (and (condition-case nil (require 'idna)
(file-error))
@ -2403,7 +2401,7 @@ message composition doesn't break too bad."
;; fontified: is used by font-lock.
;; syntax-table, local-map: I dunno.
;; We need to add XEmacs names to the list.
"Property list of with properties.forbidden in message buffers.
"Property list of with properties forbidden in message buffers.
The values of the properties are ignored, only the property names are used.")
(defun message-tamago-not-in-use-p (pos)
@ -2426,11 +2424,13 @@ This function is intended to be called from `after-change-functions'.
See also `message-forbidden-properties'."
(when (and message-strip-special-text-properties
(message-tamago-not-in-use-p begin))
(while (not (= begin end))
(when (not (get-text-property begin 'message-hidden))
(remove-text-properties begin (1+ begin)
message-forbidden-properties))
(incf begin))))
(let ((buffer-read-only nil)
(inhibit-read-only t))
(while (not (= begin end))
(when (not (get-text-property begin 'message-hidden))
(remove-text-properties begin (1+ begin)
message-forbidden-properties))
(incf begin)))))
;;;###autoload
(define-derived-mode message-mode text-mode "Message"
@ -6193,8 +6193,7 @@ Optional DIGEST will use digest to forward."
(setq e (point))
(insert
"\n-------------------- End of forwarded message --------------------\n")
(when (and (not current-prefix-arg)
message-forward-ignored-headers)
(when message-forward-ignored-headers
(save-restriction
(narrow-to-region b e)
(goto-char b)
@ -6240,7 +6239,7 @@ Optional DIGEST will use digest to forward."
(goto-char (point-max))))
(setq e (point))
(insert "<#/mml>\n")
(when (and (not current-prefix-arg)
(when (and (not message-forward-decoded-p)
message-forward-ignored-headers)
(save-restriction
(narrow-to-region b e)

View file

@ -1,5 +1,5 @@
;;; nnfolder.el --- mail folder access for Gnus
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
;; Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org> (adding MARKS)
@ -370,10 +370,11 @@ the group. Then the marks file will be regenerated properly by Gnus.")
(deffoo nnfolder-request-create-group (group &optional server args)
(nnfolder-possibly-change-group nil server)
(nnmail-activate 'nnfolder)
(when group
(unless (assoc group nnfolder-group-alist)
(push (list group (cons 1 0)) nnfolder-group-alist)
(nnfolder-save-active nnfolder-group-alist nnfolder-active-file)
(when (and group
(not (assoc group nnfolder-group-alist)))
(push (list group (cons 1 0)) nnfolder-group-alist)
(nnfolder-save-active nnfolder-group-alist nnfolder-active-file)
(save-current-buffer
(nnfolder-read-folder group)))
t)

View file

@ -554,7 +554,7 @@ parameter. It should return nil, `warn' or `delete'."
:group 'nnmail
:type '(repeat symbol))
(defcustom nnmail-split-header-length-limit 512
(defcustom nnmail-split-header-length-limit 2048
"Header lines longer than this limit are excluded from the split function."
:version "21.1"
:group 'nnmail

View file

@ -82,6 +82,12 @@ ARTICLE is the article number of the current headline.")
;;; Interface functions
(eval-when-compile
(defmacro nnrss-string-as-multibyte (string)
(if (featurep 'xemacs)
string
`(string-as-multibyte ,string))))
(deffoo nnrss-retrieve-headers (articles &optional group server fetch-old)
(nnrss-possibly-change-group group server)
(let (e)
@ -410,10 +416,6 @@ ARTICLE is the article number of the current headline.")
(defalias 'nnrss-insert 'nnrss-insert-w3)
(if (featurep 'xemacs)
(defalias 'nnrss-string-as-multibyte 'identity)
(defalias 'nnrss-string-as-multibyte 'string-as-multibyte))
;;; Snarf functions
(defun nnrss-check-group (group server)

View file

@ -348,6 +348,22 @@ If NOW, use that time instead."
;; AUTHORIZATION STATE
(eval-and-compile
(if (fboundp 'md5)
(defalias 'pop3-md5 'md5)
(defvar pop3-md5-program "md5"
"*Program to encode its input in MD5.")
(defun pop3-md5 (string)
(with-temp-buffer
(insert string)
(call-process-region (point-min) (point-max)
pop3-md5-program
t (current-buffer) nil)
;; The meaningful output is the first 32 characters.
;; Don't return the newline that follows them!
(buffer-substring (point-min) (+ 32 (point-min)))))))
(defun pop3-user (process user)
"Send USER information to POP3 server."
(pop3-send-command process (format "USER %s" user))
@ -378,22 +394,6 @@ If NOW, use that time instead."
;; TRANSACTION STATE
(eval-and-compile
(if (fboundp 'md5)
(defalias 'pop3-md5 'md5)
(defvar pop3-md5-program "md5"
"*Program to encode its input in MD5.")
(defun pop3-md5 (string)
(with-temp-buffer
(insert string)
(call-process-region (point-min) (point-max)
pop3-md5-program
t (current-buffer) nil)
;; The meaningful output is the first 32 characters.
;; Don't return the newline that follows them!
(buffer-substring (point-min) (+ 32 (point-min)))))))
(defun pop3-stat (process)
"Return the number of messages in the maildrop and the maildrop's size."
(pop3-send-command process "STAT")

View file

@ -71,7 +71,7 @@ Value is what BODY returns."
'(("Newsgroups" . nil)
("Followup-To" . nil)
("Message-ID" . nil)
("\\(Resent-\\)?\\(From\\|Cc\\|To\\|Bcc\\|Reply-To\\|Sender\
("\\(Resent-\\)?\\(From\\|Cc\\|To\\|Bcc\\|\\(In-\\)?Reply-To\\|Sender\
\\|Mail-Followup-To\\|Mail-Copies-To\\|Approved\\)" . address-mime)
(t . mime))
"*Header/encoding method alist.

View file

@ -43,7 +43,7 @@ If you are using spam.el, consider setting gnus-spam-process-newsgroups
or the gnus-group-spam-exit-processor-report-gmane group/topic parameter
instead."
:type '(radio (const nil)
(regexp :format "%t: %v\n" :size 0 :value "^nntp\+.*:gmane\."))
(regexp :value "^nntp\+.*:gmane\."))
:group 'spam-report)
(defcustom spam-report-gmane-spam-header

View file

@ -295,8 +295,7 @@ All unmarked article in such group receive the spam mark on group entry."
(defcustom spam-blackhole-good-server-regex nil
"String matching IP addresses that should not be checked in the blackholes."
:type '(radio (const nil)
(regexp :format "%t: %v\n" :size 0))
:type '(radio (const nil) regexp)
:group 'spam)
(defcustom spam-face 'gnus-splash-face
@ -1257,6 +1256,9 @@ functions")
;;;; Hashcash.
(eval-when-compile
(autoload 'mail-check-payment "hashcash"))
(condition-case nil
(progn
(require 'hashcash)
@ -1265,9 +1267,7 @@ functions")
"Check the headers for hashcash payments."
(mail-check-payment))) ;mail-check-payment returns a boolean
(file-error (progn
(defalias 'mail-check-payment 'ignore)
(defalias 'spam-check-hashcash 'ignore))))
(file-error))
;;;; BBDB
@ -1276,66 +1276,67 @@ functions")
;; all this is done inside a condition-case to trap errors
(condition-case nil
(progn
(require 'bbdb)
(require 'bbdb-com)
(eval-when-compile
(autoload 'bbdb-buffer "bbdb")
(autoload 'bbdb-create-internal "bbdb")
(autoload 'bbdb-search-simple "bbdb"))
(defun spam-enter-ham-BBDB (addresses &optional remove)
"Enter an address into the BBDB; implies ham (non-spam) sender"
(dolist (from addresses)
(when (stringp from)
(let* ((parsed-address (gnus-extract-address-components from))
(name (or (nth 0 parsed-address) "Ham Sender"))
(remove-function (if remove
'bbdb-delete-record-internal
'ignore))
(net-address (nth 1 parsed-address))
(record (and net-address
(bbdb-search-simple nil net-address))))
(when net-address
(gnus-message 5 "%s address %s %s BBDB"
(if remove "Deleting" "Adding")
from
(if remove "from" "to"))
(if record
(funcall remove-function record)
(bbdb-create-internal name nil net-address nil nil
"ham sender added by spam.el")))))))
(eval-and-compile
(when (condition-case nil
(progn
(require 'bbdb)
(require 'bbdb-com))
(file-error
(defalias 'spam-BBDB-register-routine 'ignore)
(defalias 'spam-enter-ham-BBDB 'ignore)
nil))
(defun spam-BBDB-register-routine (articles &optional unregister)
(let (addresses)
(dolist (article articles)
(when (stringp (spam-fetch-field-from-fast article))
(push (spam-fetch-field-from-fast article) addresses)))
;; now do the register/unregister action
(spam-enter-ham-BBDB addresses unregister)))
(defun spam-enter-ham-BBDB (addresses &optional remove)
"Enter an address into the BBDB; implies ham (non-spam) sender"
(dolist (from addresses)
(when (stringp from)
(let* ((parsed-address (gnus-extract-address-components from))
(name (or (nth 0 parsed-address) "Ham Sender"))
(remove-function (if remove
'bbdb-delete-record-internal
'ignore))
(net-address (nth 1 parsed-address))
(record (and net-address
(bbdb-search-simple nil net-address))))
(when net-address
(gnus-message 5 "%s address %s %s BBDB"
(if remove "Deleting" "Adding")
from
(if remove "from" "to"))
(if record
(funcall remove-function record)
(bbdb-create-internal name nil net-address nil nil
"ham sender added by spam.el")))))))
(defun spam-BBDB-unregister-routine (articles)
(spam-BBDB-register-routine articles t))
(defun spam-BBDB-register-routine (articles &optional unregister)
(let (addresses)
(dolist (article articles)
(when (stringp (spam-fetch-field-from-fast article))
(push (spam-fetch-field-from-fast article) addresses)))
;; now do the register/unregister action
(spam-enter-ham-BBDB addresses unregister)))
(defun spam-check-BBDB ()
"Mail from people in the BBDB is classified as ham or non-spam"
(let ((who (nnmail-fetch-field "from"))
(spam-split-group (if spam-split-symbolic-return
'spam
spam-split-group)))
(when who
(setq who (nth 1 (gnus-extract-address-components who)))
(if (bbdb-search-simple nil who)
t
(if spam-use-BBDB-exclusive
spam-split-group
nil))))))
(defun spam-BBDB-unregister-routine (articles)
(spam-BBDB-register-routine articles t))
(file-error (progn
(defalias 'bbdb-search-simple 'ignore)
(defalias 'spam-check-BBDB 'ignore)
(defalias 'spam-BBDB-register-routine 'ignore)
(defalias 'spam-enter-ham-BBDB 'ignore)
(defalias 'bbdb-create-internal 'ignore)
(defalias 'bbdb-delete-record-internal 'ignore)
(defalias 'bbdb-records 'ignore))))
(defun spam-check-BBDB ()
"Mail from people in the BBDB is classified as ham or non-spam"
(let ((who (nnmail-fetch-field "from"))
(spam-split-group (if spam-split-symbolic-return
'spam
spam-split-group)))
(when who
(setq who (nth 1 (gnus-extract-address-components who)))
(if (bbdb-search-simple nil who)
t
(if spam-use-BBDB-exclusive
spam-split-group
nil)))))))
;;;; ifile
@ -1411,66 +1412,63 @@ Uses `gnus-newsgroup-name' if category is nil (for ham registration)."
;;;; spam-stat
(condition-case nil
(progn
(let ((spam-stat-install-hooks nil))
(require 'spam-stat))
(eval-when-compile
(autoload 'spam-stat-buffer-change-to-non-spam "spam-stat")
(autoload 'spam-stat-buffer-change-to-spam "spam-stat")
(autoload 'spam-stat-buffer-is-non-spam "spam-stat")
(autoload 'spam-stat-buffer-is-spam "spam-stat")
(autoload 'spam-stat-load "spam-stat")
(autoload 'spam-stat-save "spam-stat")
(autoload 'spam-stat-split-fancy "spam-stat"))
(defun spam-check-stat ()
"Check the spam-stat backend for the classification of this message"
(let ((spam-split-group (if spam-split-symbolic-return
'spam
spam-split-group))
(spam-stat-split-fancy-spam-group spam-split-group) ; override
(spam-stat-buffer (buffer-name)) ; stat the current buffer
category return)
(spam-stat-split-fancy)))
(eval-and-compile
(when (condition-case nil
(let ((spam-stat-install-hooks nil))
(require 'spam-stat))
(file-error
(defalias 'spam-stat-register-ham-routine 'ignore)
(defalias 'spam-stat-register-spam-routine 'ignore)
nil))
(defun spam-stat-register-spam-routine (articles &optional unregister)
(dolist (article articles)
(let ((article-string (spam-get-article-as-string article)))
(with-temp-buffer
(insert article-string)
(if unregister
(spam-stat-buffer-change-to-non-spam)
(defun spam-check-stat ()
"Check the spam-stat backend for the classification of this message"
(let ((spam-split-group (if spam-split-symbolic-return
'spam
spam-split-group))
(spam-stat-split-fancy-spam-group spam-split-group) ; override
(spam-stat-buffer (buffer-name)) ; stat the current buffer
category return)
(spam-stat-split-fancy)))
(defun spam-stat-register-spam-routine (articles &optional unregister)
(dolist (article articles)
(let ((article-string (spam-get-article-as-string article)))
(with-temp-buffer
(insert article-string)
(if unregister
(spam-stat-buffer-change-to-non-spam)
(spam-stat-buffer-is-spam))))))
(defun spam-stat-unregister-spam-routine (articles)
(spam-stat-register-spam-routine articles t))
(defun spam-stat-unregister-spam-routine (articles)
(spam-stat-register-spam-routine articles t))
(defun spam-stat-register-ham-routine (articles &optional unregister)
(dolist (article articles)
(let ((article-string (spam-get-article-as-string article)))
(with-temp-buffer
(insert article-string)
(if unregister
(spam-stat-buffer-change-to-spam)
(defun spam-stat-register-ham-routine (articles &optional unregister)
(dolist (article articles)
(let ((article-string (spam-get-article-as-string article)))
(with-temp-buffer
(insert article-string)
(if unregister
(spam-stat-buffer-change-to-spam)
(spam-stat-buffer-is-non-spam))))))
(defun spam-stat-unregister-ham-routine (articles)
(spam-stat-register-ham-routine articles t))
(defun spam-stat-unregister-ham-routine (articles)
(spam-stat-register-ham-routine articles t))
(defun spam-maybe-spam-stat-load ()
(when spam-use-stat (spam-stat-load)))
(defun spam-maybe-spam-stat-load ()
(when spam-use-stat (spam-stat-load)))
(defun spam-maybe-spam-stat-save ()
(when spam-use-stat (spam-stat-save))))
(file-error (progn
(defalias 'spam-stat-load 'ignore)
(defalias 'spam-stat-save 'ignore)
(defalias 'spam-maybe-spam-stat-load 'ignore)
(defalias 'spam-maybe-spam-stat-save 'ignore)
(defalias 'spam-stat-register-ham-routine 'ignore)
(defalias 'spam-stat-unregister-ham-routine 'ignore)
(defalias 'spam-stat-register-spam-routine 'ignore)
(defalias 'spam-stat-unregister-spam-routine 'ignore)
(defalias 'spam-stat-buffer-is-spam 'ignore)
(defalias 'spam-stat-buffer-change-to-spam 'ignore)
(defalias 'spam-stat-buffer-is-non-spam 'ignore)
(defalias 'spam-stat-buffer-change-to-non-spam 'ignore)
(defalias 'spam-stat-split-fancy 'ignore)
(defalias 'spam-check-stat 'ignore))))
(defun spam-maybe-spam-stat-save ()
(when spam-use-stat (spam-stat-save)))))

View file

@ -102,6 +102,17 @@
to Alex Ott, Karl Fogel, Stefan Monnier, and David Kastrup for
suggestions.
2004-11-22 Reiner Steib <Reiner.Steib@gmx.de>
* message.texi (Various Message Variables): Mention that all mail
file variables are derived from `message-directory'.
* gnus.texi (Splitting Mail): Clarify bogus group.
2004-11-16 Reiner Steib <Reiner.Steib@gmx.de>
* gnus.texi (Filtering Spam Using The Spam ELisp Package):
2004-11-02 Katsumi Yamaoka <yamaoka@jpl.org>
* emacs-mime.texi (Encoding Customization): Fix

View file

@ -13244,14 +13244,16 @@ called narrowed to the headers with the first element of the rule as the
argument. It should return a non-@code{nil} value if it thinks that the
mail belongs in that group.
@cindex @samp{bogus} group
The last of these groups should always be a general one, and the regular
expression should @emph{always} be @samp{*} so that it matches any mails
expression should @emph{always} be @samp{""} so that it matches any mails
that haven't been matched by any of the other regexps. (These rules are
processed from the beginning of the alist toward the end. The first
rule to make a match will ``win'', unless you have crossposting enabled.
In that case, all matching rules will ``win''.) When new groups are
created by splitting mail, you may want to run
@code{gnus-group-find-new-groups} to see the new groups.
processed from the beginning of the alist toward the end. The first rule
to make a match will ``win'', unless you have crossposting enabled. In
that case, all matching rules will ``win''.) If no rule matched, the mail
will end up in the @samp{bogus} group. When new groups are created by
splitting mail, you may want to run @code{gnus-group-find-new-groups} to
see the new groups. This also applies to the @samp{bogus} group.
If you like to tinker with this yourself, you can set this variable to a
function of your choice. This function will be called without any
@ -13268,7 +13270,7 @@ some add @code{X-Gnus-Group} headers; most rename the Unix mbox
The mail back ends all support cross-posting. If several regexps match,
the mail will be ``cross-posted'' to all those groups.
@code{nnmail-crosspost} says whether to use this mechanism or not. Note
that no articles are crossposted to the general (@samp{*}) group.
that no articles are crossposted to the general (@samp{""}) group.
@vindex nnmail-crosspost-link-function
@cindex crosspost

View file

@ -1867,6 +1867,7 @@ follows this line--} by default.
@item message-directory
@vindex message-directory
Directory used by many mailey things. The default is @file{~/Mail/}.
All other mail file variables are derived from @code{message-directory}.
@item message-auto-save-directory
@vindex message-auto-save-directory