Mercurial > hg > xemacs-beta
diff src/symbols.c @ 4969:cbe181529c34
Automatic merge
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Wed, 03 Feb 2010 21:46:21 -0600 |
parents | e813cf16c015 ba353d7b0ce8 |
children | bcdf496e49d0 |
line wrap: on
line diff
--- a/src/symbols.c Wed Feb 03 21:06:14 2010 -0600 +++ b/src/symbols.c Wed Feb 03 21:46:21 2010 -0600 @@ -54,6 +54,8 @@ #include <config.h> #include "lisp.h" +#include "bytecode.h" /* for COMPILED_FUNCTION_ANNOTATION_HACK, + defined in bytecode.h and used here. */ #include "buffer.h" /* for Vbuffer_defaults */ #include "console-impl.h" #include "elhash.h" @@ -716,12 +718,19 @@ DEFUN ("define-function", Fdefine_function, 2, 2, 0, /* Set SYMBOL's function definition to NEWDEF, and return NEWDEF. Associates the function with the current load file, if any. +If NEWDEF is a compiled-function object, stores the function name in +the `annotated' slot of the compiled-function (retrievable using +`compiled-function-annotation'). */ (symbol, newdef)) { /* This function can GC */ Ffset (symbol, newdef); LOADHIST_ATTACH (Fcons (Qdefun, symbol)); +#ifdef COMPILED_FUNCTION_ANNOTATION_HACK + if (COMPILED_FUNCTIONP (newdef)) + XCOMPILED_FUNCTION (newdef)->annotated = symbol; +#endif /* COMPILED_FUNCTION_ANNOTATION_HACK */ return newdef; }