all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Debugging 'message-send , an unexpected void function error occured.
@ 2012-11-05 19:19 Yves Baumes
  2012-11-07 11:01 ` Michael Heerdegen
  0 siblings, 1 reply; 2+ messages in thread
From: Yves Baumes @ 2012-11-05 19:19 UTC (permalink / raw)
  To: help-gnu-emacs

Hi everyone,

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. I'm quite new and experimenting 
stuff, to learn.

Regards
Yves



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Debugging 'message-send , an unexpected void function error occured.
  2012-11-05 19:19 Debugging 'message-send , an unexpected void function error occured Yves Baumes
@ 2012-11-07 11:01 ` Michael Heerdegen
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Heerdegen @ 2012-11-07 11:01 UTC (permalink / raw)
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-07 11:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-05 19:19 Debugging 'message-send , an unexpected void function error occured Yves Baumes
2012-11-07 11:01 ` Michael Heerdegen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.