From 48b1cf5d45127330c587793161467eb3a4e553fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Thu, 2 Oct 2014 14:34:03 +0100 Subject: [PATCH] store away all directives we find. --- pl/boot.yap | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pl/boot.yap b/pl/boot.yap index e0115243a..62d563a4a 100644 --- a/pl/boot.yap +++ b/pl/boot.yap @@ -688,8 +688,17 @@ number of steps. % % but YAP and SICStus does. % - '$process_directive'(G, _, M, VL, Pos) :- - ( '$execute'(M:G) -> true ; format(user_error,':- ~w:~w failed.~n',[M,G]) ). + '$process_directive'(G, Mode, M, VL, Pos) :- + ( '$undefined'('$save_directive'(G, Mode, M, VL, Pos),prolog) -> + true + ; + '$save_directive'(G, Mode, M, VL, Pos) + -> + true + ; + true + ), + ( '$execute'(M:G) -> true ; format(user_error,':- ~w:~w failed.~n',[M,G]) ). '$continue_with_command'(Where,V,'$stream_position'(C,_P,A1,A2,A3),'$source_location'(_F,L):G,Source) :- !, '$continue_with_command'(Where,V,'$stream_position'(C,L,A1,A2,A3),G,Source).