fix qly to load .yaprc before -l starts.

This commit is contained in:
Vítor Santos Costa 2012-01-13 23:23:18 +00:00
parent ed0d3f6cae
commit 037597ce2f

View File

@ -72,18 +72,19 @@ qsave_program(File) :-
erase(R), erase(R),
shlib:reload_foreign_libraries, shlib:reload_foreign_libraries,
fail. fail.
% use if we come from a save_program and we have a goal to execute % this should be done before -l kicks in.
'$init_from_saved_state_and_args' :-
get_value('$consult_on_boot',X), X \= [],
set_value('$consult_on_boot',[]),
'$do_startup_reconsult'(X),
fail.
'$init_from_saved_state_and_args' :- '$init_from_saved_state_and_args' :-
'$access_yap_flags'(16,0), '$access_yap_flags'(16,0),
( exists('~/.yaprc') -> load_files('~/.yaprc', []) ; true ), ( exists('~/.yaprc') -> load_files('~/.yaprc', []) ; true ),
( exists('~/.prologrc') -> load_files('~/.prologrc', []) ; true ), ( exists('~/.prologrc') -> load_files('~/.prologrc', []) ; true ),
( exists('~/prolog.ini') -> load_files('~/prolog.ini', []) ; true ), ( exists('~/prolog.ini') -> load_files('~/prolog.ini', []) ; true ),
fail. fail.
% use if we come from a save_program and we have a goal to execute
'$init_from_saved_state_and_args' :-
get_value('$consult_on_boot',X), X \= [],
set_value('$consult_on_boot',[]),
'$do_startup_reconsult'(X),
fail.
'$init_from_saved_state_and_args' :- '$init_from_saved_state_and_args' :-
'$startup_goals', '$startup_goals',
fail. fail.