From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/47064 Path: main.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: spam.el and missing functions Date: Wed, 09 Oct 2002 10:02:58 +0900 Organization: Emacsen advocacy group Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1034125461 31412 127.0.0.1 (9 Oct 2002 01:04:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 9 Oct 2002 01:04:21 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17z5Gu-0008AT-00 for ; Wed, 09 Oct 2002 03:04:20 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 17z5G8-0004vD-00; Tue, 08 Oct 2002 20:03:32 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 08 Oct 2002 20:04:15 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id UAA15641 for ; Tue, 8 Oct 2002 20:04:03 -0500 (CDT) Original-Received: (qmail 29550 invoked by alias); 9 Oct 2002 01:03:15 -0000 Original-Received: (qmail 29545 invoked from network); 9 Oct 2002 01:03:14 -0000 Original-Received: from unknown (HELO mars.web-hosting.com) (207.228.244.150) by gnus.org with SMTP; 9 Oct 2002 01:03:14 -0000 Original-Received: from localhost ([207.228.245.242]) by mars.web-hosting.com (8.11.1/8.11.1) with ESMTP id g9913Eo04676 for ; Tue, 8 Oct 2002 21:03:15 -0400 (EDT) Original-To: ding@gnus.org Mail-Copies-To: never User-Agent: Gnus/5.090008 (Oort Gnus v0.08) XEmacs/21.4 (Military Intelligence (RC2), sparc-sun-solaris2.6) X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( Cancel-Lock: sha1:ZoCuQpc4dvdcf2khAKAqyXHlcwY= X-Hashcash: 021009:ding@gnus.org:45a6d9bd06d41931 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:47064 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:47064 --=-=-= >>>>> In >>>>> Ted Zlatanov wrote: >> Emacs 20.7: >> ** The following functions are not known to be defined: >> bbdb-search, bbdb-records, locate-file, >> display-message-or-buffer [...] > I fixed the BBDB errors with: > ;; BBDB autoloads > (autoload 'bbdb-search "bbdb-com") Unfortunately, it doesn't fix. The byte-compiler still generates the byte-code which is equivalent to `(funcall 'bbdb-search args)' in the function `spam-check-bbdb', and then: (with-temp-buffer (insert "From: who\n") (condition-case code (spam-check-bbdb) (error code))) => (invalid-function (macro . #[(records &optional name company net... Since the macro definition of `bbdb-search' should be expanded before byte-compiling the function `spam-check-bbdb', bbdb-com.elc should be loaded at the compile time rather than autoloaded. The following code will help only BBDB users who have already installed BBDB. --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- spam.el~ 2002-10-08 21:52:36 +0000 +++ spam.el 2002-10-09 01:00:36 +0000 @@ -40,9 +40,14 @@ (require 'message) ;; BBDB autoloads -(autoload 'bbdb-search "bbdb-com") (autoload 'bbdb-records "bbdb-com") +;; Attempt to load BBDB macros +(eval-when-compile + (condition-case nil + (require 'bbdb-com) + (error))) + ;;; Main parameters. (defvar spam-use-blacklist t --=-=-=--