help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging 'message-send , an unexpected void function error occured.


From: Michael Heerdegen
Subject: Re: Debugging 'message-send , an unexpected void function error occured.
Date: Wed, 07 Nov 2012 12:01:51 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

> Hi everyone,

Hi!

> I've put a breakpoint on the 'message-send function in message.el file.
> When the execution flow hit the breakpoint at the start of the function,
> then I hit 'c' in order to continue execution.
> Then the execution stops in what is unexpected for me:
> "Symbol's function definition is void: caddr".
>
> Indeed, the 'caddr function is used in the body of the 'message-send
> function.
> And indeed (describe-function 'caddr) results in an error for me.
>
> In "normal" execution (i.e. no debuger involved) the interruption on
> caddr does not occur.
> Why is that ? If I manually define my own 'caddr function (in
> *scratch* for instance),
> the "instrumented" execution does not complain, of course. But I do
> not want to have to
> provide a primitive function definition.
>
> Does the same error occurs for you? What did I miss? Do I need to
> import an extra module somewhere before running the "instrumented"
> mode? Some initilisation that I miss?
>
> Sorry if the question feels stupid.

No, it isn't a stupid question.

I assume that you use a 24.x Emacs.  There, `caddr' is a Lisp macro:

| caddr is an alias for `cl-caddr' in `cl.el'.
| 
| (caddr X)
| 
| This function has a compiler macro.
| 
| Return the `car' of the `cdr' of the `cdr' of X.

If you run in "normal" execution, you run compiled code where macros
have been expanded.  Thus, Emacs doesn't need the definition of the
macro.

However, if you run an instrumented function with edebug, you use
uncompiled code.  That's why you must require cl to use edebug for this,
so that the macro definition is known to Emacs.

In general, have a look at the `require' calls at the files' beginnings
to see which stuff may have to be loaded to make macro definitions known
to Emacs for debugging with edebug.


Regards,

Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]