Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
Subject: Re: spam.el and missing functions
Date: Wed, 09 Oct 2002 10:02:58 +0900	[thread overview]
Message-ID: <yotlwuosh1a5.fsf@jpl.org> (raw)
In-Reply-To: <m3y9999elt.fsf@heechee.beld.net>

[-- Attachment #1: Type: text/plain, Size: 976 bytes --]

>>>>> In <m3y9999elt.fsf@heechee.beld.net>
>>>>>	Ted Zlatanov <tzz@lifelogs.com> 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 385 bytes --]

--- 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

  parent reply	other threads:[~2002-10-09  1:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-08 12:21 Katsumi Yamaoka
2002-10-08 14:42 ` Ted Zlatanov
2002-10-08 23:38   ` Jesper Harder
2002-10-08 23:57     ` François Pinard
2002-10-09  1:35       ` Jesper Harder
2002-10-09 14:54     ` Ted Zlatanov
2002-10-09  1:02   ` Katsumi Yamaoka [this message]
2002-10-09 14:53     ` Ted Zlatanov
2002-10-09 23:09       ` Alex Schroeder
2002-10-17  9:24   ` Katsumi Yamaoka
2002-10-18  1:31     ` Ted Zlatanov
2002-10-18  1:47       ` Katsumi Yamaoka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yotlwuosh1a5.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).