X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/3042deeff3add313321ec43bc4d012f43950df71..24d2266c2003adab99cb30587a353c4663af7ddf:/lisp/gnus/spam.el diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el index fddebb1d29..c315f2f034 100644 --- a/lisp/gnus/spam.el +++ b/lisp/gnus/spam.el @@ -1,6 +1,7 @@ ;;; spam.el --- Identifying spam -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Maintainer: Ted Zlatanov @@ -8,20 +9,18 @@ ;; This file is part of GNU Emacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -40,23 +39,26 @@ ;;{{{ compilation directives and autoloads/requires +;; For Emacs < 22.2. +(eval-and-compile + (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) + (eval-when-compile (require 'cl)) -(eval-when-compile (require 'spam-report)) -(eval-when-compile (require 'hashcash)) +(require 'message) ;for the message-fetch-field functions (require 'gnus-sum) - (require 'gnus-uu) ; because of key prefix issues ;;; for the definitions of group content classification and spam processors (require 'gnus) -(require 'message) ;for the message-fetch-field functions + +(eval-when-compile (require 'spam-report)) +(eval-when-compile (require 'hashcash)) ;; for nnimap-split-download-body-default (eval-when-compile (require 'nnimap)) ;; autoload query-dig -(eval-and-compile - (autoload 'query-dig "dig")) +(autoload 'query-dig "dig") ;; autoload spam-report (eval-and-compile @@ -66,15 +68,13 @@ (autoload 'spam-report-resend "spam-report")) ;; autoload gnus-registry -(eval-and-compile - (autoload 'gnus-registry-group-count "gnus-registry") - (autoload 'gnus-registry-add-group "gnus-registry") - (autoload 'gnus-registry-store-extra-entry "gnus-registry") - (autoload 'gnus-registry-fetch-extra "gnus-registry")) +(autoload 'gnus-registry-group-count "gnus-registry") +(autoload 'gnus-registry-add-group "gnus-registry") +(autoload 'gnus-registry-store-extra-entry "gnus-registry") +(autoload 'gnus-registry-fetch-extra "gnus-registry") -;; autoload query-dns -(eval-and-compile - (autoload 'query-dns "dns")) +;; autoload dns-query +(autoload 'dns-query "dns") ;;}}} @@ -173,7 +173,7 @@ The regular expression is matched against the address." :group 'spam) (defcustom spam-use-dig t - "Whether `query-dig' should be used instead of `query-dns'." + "Whether `query-dig' should be used instead of `dns-query'." :type 'boolean :group 'spam) @@ -2038,9 +2038,9 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (push (list ip server query-result) matches))) ;; else, if not using dig.el - (when (query-dns query-string) + (when (dns-query query-string) (gnus-message 6 "positive blackhole check") - (push (list ip server (query-dns query-string 'TXT)) + (push (list ip server (dns-query query-string 'TXT)) matches))))))))) (when matches spam-split-group))) @@ -2066,6 +2066,9 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." (autoload 'bbdb-create-internal "bbdb") (autoload 'bbdb-search-simple "bbdb")) +;; Autoloaded in message, which we require. +(declare-function gnus-extract-address-components "gnus-util" (from)) + (eval-and-compile (when (condition-case nil (progn @@ -2939,5 +2942,5 @@ installed through `spam-necessary-extra-headers'." (provide 'spam) -;;; arch-tag: 07e6e0ca-ab0a-4412-b445-1f6c72a4f27f +;; arch-tag: 07e6e0ca-ab0a-4412-b445-1f6c72a4f27f ;;; spam.el ends here