Bryan said:

> I have just upgraded to VM 5.65 beta (from 5.54) and BBDB 1.50 (from
> 1.49), and the two are not at all happy together.  As soon as I run VM
> (with bbdb-insinuate-vm set to autoload and do what used to be the
> Right Thing), I get the following problem:
> 
> Signalling: (invalid-function (macro . #[(message) "  EE" [aref message 0] 4]))
> ...

This happened to several people before.
The problem is that your bbdb was byte-compiled without some
vm macros being loaded properly.
I posted a way to get around this problem on a previous posting
to info-bbdb mailing list, but I think I've found the root of the
problem.

I'll describe the fix first then give explanations later.

o Fix

  o  In the file vm-5.xx/make-autoloads, change one line from

          (setq macro t)
     to
          (setq macro 'macro)

  o Byte-compile vm.  It should not matter whether you compile vm with
    or without autoloads now.

  o Make sure you byte-compile bbdb AFTER you byte-compile VM!


o Details

  The problem was that when you byte-compile vm with autoloads,
  the function "print-autoloads" defined in file "make-autoloads"
  would create the following code in vm.elc:

  (autoload vm-some-function "vm-some-file" "" nil t)

  The problem is the fifth argument.
  It should be the symbol 'macro rather than t for emacs-19.22 and
  lemacs 19.9.    For emacs-18.59, t should be just fine.
  Here are the doc strings from emacs-18.59 and emacs-19.22 for
  the function autoload.  Note how they differ in the use of
  the fifth argument:

  emacs-18.59 autoload:

    Define FUNCTION to autoload from FILE.
    FUNCTION is a symbol; FILE is a file name string to pass to  load.
    Third arg DOCSTRING is documentation for the function.
    Fourth arg FROM_KBD if non-nil says function can be called interactively.
    Fifth arg MACRO if non-nil says the function is really a macro.
    Third through fifth args give info about the real definition.
    They default to nil.
    If FUNCTION is already defined other than as an autoload,
    this does nothing and returns nil.


  GNU emacs 19.22 autoload: a built-in function.

    Define FUNCTION to autoload from FILE.
    FUNCTION is a symbol; FILE is a file name string to pass to `load'.
    Third arg DOCSTRING is documentation for the function.
    Fourth arg INTERACTIVE if non-nil says function can be called interactively.
    Fifth arg TYPE indicates the type of the object:
       nil or omitted says FUNCTION is a function,
       `keymap' says FUNCTION is really a keymap, and
       `macro' or t says FUNCTION is really a macro.
    Third through fifth args give info about the real definition.
    They default to nil.
    If FUNCTION is already defined other than as an autoload,
    this does nothing and returns nil.

    arguments: (function file &optional docstring interactive type)

Richard Y. Kim
[EMAIL PROTECTED]

Reply via email to