There is indeed a problem with this configuration...

Here's some mail I received to clarify this...

From: Gardner Cohen <[EMAIL PROTECTED]>
To: Robert Nicholson <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: bbdb1.50 problems with GNUs 4.1?
Date: Wed, 4 May 1994 08:22:30 -0700

Robert Nicholson said:

   I believe there's a problem in the XOVER sources in Felix Lees GNUS
   addon..

   In particular... when using his nntp.el gnus-Article-mode-hook is
   defined because gnus-article-prepare-hook is _not_ seen to be bound
   to anything. Why? I'm running GNUS4.1

You're right.  The problem is nntp.el is being (require ed by gnus
before the defvar for gnus-article-prepare-hook in gnus.el gets run.
This fools nntp-xover.el into thinking it needs to add to
gnus-Article-prepare-hook, which then fools bbdb.

I never noticed this because I haven't been using bbdb with gnus, and
the only thing nntp is doing to that hook is adding a function to load
Xrefs from the article in case your NOV database doesn't have xref
data, and all the servers I use gnus with have xref in the database.

The easiest solution is to add

(defvar gnus-article-prepare-hook nil "screwup")

to your .emacs ahead of any references to gnus.  Once I did this, nntp
binds to the right hook, and bbdb isn't fooled.

The correct solution may be to move the require in gnus below the
defvar.

-----

Rather those do any of that I chose to do this instead.

Simply change... the following in the XOVER nntp.el (byte-compile)

(nntp/add-hook
 (if (boundp 'gnus-article-prepare-hook)
     'gnus-article-prepare-hook
   'gnus-Article-prepare-hook)
 'nntp/article-get-xrefs)

TO

(nntp/add-hook
 (if (boundp 'gnus-Article-prepare-hook)
     'gnus-Article-prepare-hook
   'gnus-article-prepare-hook)
 'nntp/article-get-xrefs)

That fixes the problem.

Reply via email to