* libguile/backtrace.c (scm_display_error): Allow a deprecated use of
this function to pass a stack as the first argument. Thanks to Peter
Brett for pointing it out, in
http://lists.gnu.org/archive/html/guile-user/2011-06/msg00000.html.
{
SCM_VALIDATE_OUTPUT_PORT (2, port);
+#if SCM_ENABLE_DEPRECATED
+ if (SCM_STACKP (frame))
+ {
+ scm_c_issue_deprecation_warning
+ ("Passing a stack as the first argument to `scm_display_error' is "
+ "deprecated. Pass a frame instead.");
+ if (SCM_STACK_LENGTH (frame))
+ frame = scm_stack_ref (frame, SCM_INUM0);
+ else
+ frame = SCM_BOOL_F;
+ }
+#endif
+
scm_i_display_error (frame, port, subr, message, args, rest);
return SCM_UNSPECIFIED;