/* Evaluator for GNU Emacs Lisp interpreter.
- Copyright (C) 1985, 86, 87, 93, 94, 95, 99, 2000, 2001, 2002
+ Copyright (C) 1985, 86, 87, 93, 94, 95, 99, 2000, 2001, 02, 2004
Free Software Foundation, Inc.
This file is part of GNU Emacs.
doc: /* Make SYMBOL a variable alias for symbol ALIASED.
Setting the value of SYMBOL will subsequently set the value of ALIASED,
and getting the value of SYMBOL will return the value ALIASED has.
-ALIASED nil means remove the alias; SYMBOL is unbound after that.
-Third arg DOCSTRING, if non-nil, is documentation for SYMBOL. */)
+Third arg DOCSTRING, if non-nil, is documentation for SYMBOL.
+The return value is ALIASED. */)
(symbol, aliased, docstring)
Lisp_Object symbol, aliased, docstring;
{
The value of the last BODY form is returned from the condition-case.
See also the function `signal' for more info.
-usage: (condition-case VAR BODYFORM HANDLERS...) */)
+usage: (condition-case VAR BODYFORM &rest HANDLERS) */)
(args)
Lisp_Object args;
{
handlers = Fcdr (Fcdr (args));
CHECK_SYMBOL (var);
- for (val = handlers; ! NILP (val); val = Fcdr (val))
+ for (val = handlers; CONSP (val); val = XCDR (val))
{
Lisp_Object tem;
- tem = Fcar (val);
+ tem = XCAR (val);
if (! (NILP (tem)
|| (CONSP (tem)
&& (SYMBOLP (XCAR (tem))
The symbol `error' should normally be one of them.
DATA should be a list. Its elements are printed as part of the error message.
+See Info anchor `(elisp)Definition of signal' for some details on how this
+error message is constructed.
If the signal is handled, DATA is made available to the handler.
See also the function `condition-case'. */)
(error_symbol, data)
/* Lists may represent commands. */
if (!CONSP (fun))
return Qnil;
- funcar = Fcar (fun);
- if (!SYMBOLP (funcar))
- return Fsignal (Qinvalid_function, Fcons (fun, Qnil));
+ funcar = XCAR (fun);
if (EQ (funcar, Qlambda))
- return Fassq (Qinteractive, Fcdr (Fcdr (fun)));
+ return Fassq (Qinteractive, Fcdr (XCDR (fun)));
if (EQ (funcar, Qautoload))
- return Fcar (Fcdr (Fcdr (Fcdr (fun))));
+ return Fcar (Fcdr (Fcdr (XCDR (fun))));
else
return Qnil;
}
#endif /* not NO_ARG_ARRAY */
}
+/* The caller should GCPRO all the elements of ARGS. */
+
DEFUN ("funcall", Ffuncall, Sfuncall, 1, MANY, 0,
doc: /* Call first argument as a function, passing remaining arguments to it.
Return the value that function returns.
}
\f
+void
+mark_backtrace ()
+{
+ register struct backtrace *backlist;
+ register int i;
+
+ for (backlist = backtrace_list; backlist; backlist = backlist->next)
+ {
+ mark_object (*backlist->function);
+
+ if (backlist->nargs == UNEVALLED || backlist->nargs == MANY)
+ i = 0;
+ else
+ i = backlist->nargs - 1;
+ for (; i >= 0; i--)
+ mark_object (backlist->args[i]);
+ }
+}
+
void
syms_of_eval ()
{