Pat's patches to top_level_hook

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@904 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2003-10-22 14:08:29 +00:00
parent e8a8177196
commit 5244795d97
2 changed files with 3 additions and 3 deletions

View File

@ -6446,10 +6446,10 @@ Just fail
semantics for the @code{atom_chars/1} or @code{number_chars/1} built-in, semantics for the @code{atom_chars/1} or @code{number_chars/1} built-in,
or whether it should follow the ISO standard (@code{iso} option). or whether it should follow the ISO standard (@code{iso} option).
@item toplevel_hook(@var{G}) +@item toplevel_hook
@findex toplevel_hook (yap_flag/2 option) @findex toplevel_hook (yap_flag/2 option)
@* @*
If bound, set @var{G} to a goal to be executed before entering the +If bound, set the argument to a goal to be executed before entering the
top-level. If unbound show the current goal or @code{true} if none is 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 presented. Only the first solution is considered and the goal is not
backtracked into. backtracked into.

View File

@ -154,6 +154,7 @@ read_sig.
'$enter_top_level' :- '$enter_top_level' :-
prompt(_,' ?- '), prompt(_,' ?- '),
prompt(' | '), prompt(' | '),
'$run_toplevel_hooks',
'$read_vars'(user_input,Command,_,Varnames), '$read_vars'(user_input,Command,_,Varnames),
set_value(spy_fs,0), set_value(spy_fs,0),
set_value(spy_sp,0), set_value(spy_sp,0),
@ -161,7 +162,6 @@ read_sig.
set_value(spy_skip,off), set_value(spy_skip,off),
set_value(spy_stop,on), set_value(spy_stop,on),
prompt(_,' |: '), prompt(_,' |: '),
'$run_toplevel_hooks',
'$command'((?-Command),Varnames,top), '$command'((?-Command),Varnames,top),
'$sync_mmapped_arrays', '$sync_mmapped_arrays',
set_value('$live','$false'). set_value('$live','$false').