diff --git a/docs/yap.tex b/docs/yap.tex index f68604a8e..0d81ed15e 100644 --- a/docs/yap.tex +++ b/docs/yap.tex @@ -6301,6 +6301,12 @@ If @var{Value} is unbound, tell whether debugging is @code{on} or @code{off}. If @var{Value} is bound to @code{on} enable debugging, and if it is bound to @code{off} disable debugging. ++@item debugger_print_options +@findex debugger_print_options (yap_flag/2 option) +@* +If bound, set the argument to the @code{write_term/3} options the +debugger uses to write terms. If unbound, show the current options. + @item discontiguous_warnings @findex discontiguous_warnings (yap_flag/2 option) @* @@ -6553,6 +6559,12 @@ top-level. If unbound show the current goal or @code{true} if none is presented. Only the first solution is considered and the goal is not backtracked into. ++@item toplevel_print_options +@findex toplevel_print_options (yap_flag/2 option) +@* ++If bound, set the argument to the @code{write_term/3} options used to write +terms from the top-level. If unbound, show the current options. + @item typein_module @findex typein_module (yap_flag/2 option) @* diff --git a/pl/yio.yap b/pl/yio.yap index 56347e13f..0d90d9904 100644 --- a/pl/yio.yap +++ b/pl/yio.yap @@ -121,13 +121,15 @@ open(F,T,S,Opts) :- '$check_force_opt_arg'(X,G) ; '$do_error'(domain_error(close_option,Opt),G) ). -'$check_opt'(open(_,_,_,_),Opt,G) :- !, +'$check_opt'(open(_,_,_,_),Opt,G) :- '$check_opt_open'(Opt, G). -'$check_opt'(read_term(_,_),Opt,G) :- !, +'$check_opt'(read_term(_,_),Opt,G) :- '$check_opt_read'(Opt, G). -'$check_opt'(stream_property(_,_),Opt,G) :- !, +'$check_opt'(stream_property(_,_),Opt,G) :- '$check_opt_sp'(Opt, G). -'$check_opt'(write_term(_,_),Opt,G) :- !, +'$check_opt'(write_term(_,_),Opt,G) :- + '$check_opt_write'(Opt, G). +'$check_opt'(yap_flag(_,_),Opt,G) :- '$check_opt_write'(Opt, G).