return pdl;
}
+/* Return a pointer to somewhere near the top of the C stack. */
+void *
+near_C_stack_top (void)
+{
+ return backtrace_args (backtrace_top ());
+}
void
init_eval_once (void)
specpdl = specpdl_ptr = pdlvec + 1;
/* Don't forget to update docs (lispref node "Local Variables"). */
max_specpdl_size = 1300; /* 1000 is not enough for CEDET's c-by.el. */
- max_lisp_eval_depth = 600;
+ max_lisp_eval_depth = 800;
Vrun_hooks = Qnil;
}
void
init_eval (void)
{
+ gcprolist = 0;
+ byte_stack_list = 0;
specpdl_ptr = specpdl;
{ /* Put a dummy catcher at top-level so that handlerlist is never NULL.
This is important since handlerlist->nextfree holds the freelist
if (!NILP (Vinternal_interpreter_environment)
&& CONSP (quoted)
&& EQ (XCAR (quoted), Qlambda))
- /* This is a lambda expression within a lexical environment;
- return an interpreted closure instead of a simple lambda. */
- return Fcons (Qclosure, Fcons (Vinternal_interpreter_environment,
- XCDR (quoted)));
+ { /* This is a lambda expression within a lexical environment;
+ return an interpreted closure instead of a simple lambda. */
+ Lisp_Object cdr = XCDR (quoted);
+ Lisp_Object tmp = cdr;
+ if (CONSP (tmp)
+ && (tmp = XCDR (tmp), CONSP (tmp))
+ && (tmp = XCAR (tmp), CONSP (tmp))
+ && (EQ (QCdocumentation, XCAR (tmp))))
+ { /* Handle the special (:documentation <form>) to build the docstring
+ dynamically. */
+ Lisp_Object docstring = eval_sub (Fcar (XCDR (tmp)));
+ CHECK_STRING (docstring);
+ cdr = Fcons (XCAR (cdr), Fcons (docstring, XCDR (XCDR (cdr))));
+ }
+ return Fcons (Qclosure, Fcons (Vinternal_interpreter_environment,
+ cdr));
+ }
else
/* Simply quote the argument. */
return quoted;
while (backtrace_p (pdl))
{
- write_string (backtrace_debug_on_exit (pdl) ? "* " : " ", 2);
+ write_string (backtrace_debug_on_exit (pdl) ? "* " : " ");
if (backtrace_nargs (pdl) == UNEVALLED)
{
Fprin1 (Fcons (backtrace_function (pdl), *backtrace_args (pdl)),
Qnil);
- write_string ("\n", -1);
+ write_string ("\n");
}
else
{
tem = backtrace_function (pdl);
Fprin1 (tem, Qnil); /* This can QUIT. */
- write_string ("(", -1);
+ write_string ("(");
{
ptrdiff_t i;
for (i = 0; i < backtrace_nargs (pdl); i++)
{
- if (i) write_string (" ", -1);
+ if (i) write_string (" ");
Fprin1 (backtrace_args (pdl)[i], Qnil);
}
}
- write_string (")\n", -1);
+ write_string (")\n");
}
pdl = backtrace_next (pdl);
}
DEFSYM (Qautoload, "autoload");
DEFSYM (Qinhibit_debugger, "inhibit-debugger");
DEFSYM (Qmacro, "macro");
- DEFSYM (Qdeclare, "declare");
/* Note that the process handling also uses Qexit, but we don't want
to staticpro it twice, so we just do it here. */
DEFSYM (Qand_rest, "&rest");
DEFSYM (Qand_optional, "&optional");
DEFSYM (Qclosure, "closure");
+ DEFSYM (QCdocumentation, ":documentation");
DEFSYM (Qdebug, "debug");
DEFVAR_LISP ("inhibit-debugger", Vinhibit_debugger,