anchor.diff:  
   %% unslurp(State) -> {ok,State}.
   %% slurp(File, State) -> {{ok,Mod},State}.
  -%%  Load in a file making all functions available. We call the
  -%%  compiler directly and only add defined functions, macros are
  -%%  lost. Any exported macros will be available in the
  -%%  LFE-EXPAND-EXPORTED-MACRO/3 function.
  -
  --record(slurp, {mod,imps=[]}).                  %For slurping
  +%%  Load in a file making all the functions and macros available.
  +%%  There is a bit of trickery to get hold of the compile environment
  +%%  to get hold of the macros. We call the compiler directly but don't
  +%%  make the LFE-EXPAND-EXPORTED-MACRO/3 function.
  +
  +-record(slurp, {mod,funs=[],imps=[]}).          %For slurping
   
   unslurp(St0) ->
       St1 = case St0#state.slurp of
  
positive.code:             error
      end.
  
  slurp_errors(Errors) ->
      foreach(fun ({File,Es}) -> slurp_errors(File, Es) end, Errors).
  
  slurp_warnings(Warnings) ->
      foreach(fun ({File,Ws}) -> slurp_warnings(File, Ws) end, Warnings).
  
  slurp_errors(File, Es) -> slurp_ews(File, "~s:~w: ~s\n", Es).
  
  slurp_warnings(File, Es) -> slurp_ews(File, "~s:~w: Warning: ~s\n", Es).
  
  slurp_ews(File, Format, Ews) ->
      foreach(fun ({Line,Mod,Error}) ->
                      Cs = Mod:format_error(Error),
                      lfe_io:format(Format, [File,Line,Cs])
              end, Ews).
  
  collect_form(['define-module',Mod|Mdef], _, St0) ->
      St1 = collect_mdef(Mdef, St0),
      {[],St1#slurp{mod=Mod}};
  collect_form(['extend-module'|Mdef], _, St0) ->
      St1 = collect_mdef(Mdef, St0),
      {[],St1};
  collect_form(['eval-when-compile'|_], _, St) ->
      %% Can safely ignore this, everything already in environment.
      {[],St};
  collect_form(['define-function',F,Def], _, St) ->
      Ar = function_arity(Def),
      {[{F,Ar,Def}],St}.
  
  collect_mdef([[import|Is]|Mdef], St) ->
      collect_mdef(Mdef, collect_imps(Is, St));
  
negative.code: slurp([File], St0) ->
      {ok,#state{curr=Ce0}=St1} = unslurp(St0),   %Reset the environment
      Name = lfe_eval:expr(File, Ce0),            %Get file name
      case slurp_1(Name, Ce0) of
          {ok,Mod,Ce1} ->                         %Set the new environment
              {{ok,Mod},St1#state{save=Ce0,curr=Ce1,slurp=true}};
          error ->
              {error,St1}
      end.
  
  slurp_1(Name, Ce) ->
      case slurp_file(Name) of
          {ok,Mod,Fs,Env0,Ws} ->
              slurp_warnings(Ws),
  	    %% Collect functions and imports.
              Sl0 = #slurp{mod=Mod,funs=[],imps=[]},
              Sl1 = lists:foldl(fun collect_module/2, Sl0, Fs),
              %% Add imports to environment.
              Env1 = foldl(fun ({M,Is}, Env) ->
                                   foldl(fun ({{F,A},R}, E) ->
                                                 add_ibinding(M, F, A, R, E)
                                         end, Env, Is)
                           end, Env0, Sl1#slurp.imps),
              %% Add functions to environment.
              Env2 = foldl(fun ({N,Ar,Def}, Env) ->
                                   lfe_eval:add_dynamic_func(N, Ar, Def, Env)
                           end, Env1, Sl1#slurp.funs),
              {ok,Mod,add_env(Env2, Ce)};
          {error,Mews,Es,Ws} ->
              slurp_errors(Es),
              slurp_warnings(Ws),
  