Commit c447fea0 authored by Marius Gerbershagen's avatar Marius Gerbershagen

doc: fix documentation of si_safe_eval

parent 689ac03a
Pipeline #45499069 (#206) passed with stage
......@@ -788,14 +788,18 @@ with the @code{si_make_lambda} function.
@code{si_safe_eval} evaluates @code{form} in the lexical
environment@footnote{Note that @code{env} must be a lexical
environment as used in the interpreter, @xref{The lexical environment}}
@code{env}, which can be @code{ECL_NIL}. Before evaluating it, the
expression form is bytecompiled.
environment as used in the interpreter, @xref{The lexical
environment}} @code{env}, which can be @code{ECL_NIL}. Before
evaluating it, the expression form is bytecompiled. If the form
signals an error, or tries to jump to an outer point, the function has
two choices: by default, it will invoke a debugger, but if a third
value is supplied, then @code{si_safe_eval} will not use a debugger
but rather return that value.
@itemize @bullet
@item @strong{DEPRECATED} @code{cl_object cl_eval (cl_object form)} -
@code{cl_eval} is the equivalent of @code{si_safe_eval} but without
environment and with err_value set to nil. It exists only for
environment and with no @code{err-value} supplied. It exists only for
compatibility with previous versions.
@item @strong{DEPRECATED} @code{cl_object cl_safe_eval (cl_object form, cl_object env, cl_object err_value)} -
Equivalent of @code{si_safe_eval}.
......@@ -806,7 +810,7 @@ Equivalent of @code{si_safe_eval}.
@example
si_object form = ecl_read_from_cstring("(print 1)");
si_safe_eval(2, form, ECL_NIL);
si_safe_eval(3, form, ECL_NIL, 3); /* on error function will return 3 */
si_safe_eval(3, form, ECL_NIL, ecl_make_fixnum(3)); /* on error function will return 3 */
@end example
@end deftypefun
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment