anchor.diff:      end.
     
    
  -%%-spec(rename_mod_1/5::(filename(), string(), [dir()], integer(),bool()) ->{ok, [filename()]}).
  -rename_mod_1(FileName, NewName, SearchPaths, TabWidth, RenameTestMod) ->     %% currently only for Emacs; need to extend to Eclipse.
  -    Cmd = "CMD: " ++ atom_to_list(?MODULE) ++ ":rename_mod(" ++ "\"" ++
  -	FileName ++ "\", " ++ NewName ++ "\"," ++ "[" ++ 
  -	refac_util:format_search_paths(SearchPaths) ++ "]," ++ integer_to_list(TabWidth) ++ ").",    
  -    {ok, {AnnAST, Info}}= refac_util:parse_annotate_file(FileName,true, SearchPaths),
  -    {value, {module, OldModName}} = lists:keysearch(module, 1, Info), 
  -    NewModName = list_to_atom(NewName),
  -    TestFrameWorkUsed = refac_util:test_framework_used(FileName), 
  -    case lists:member(eunit, TestFrameWorkUsed) andalso RenameTestMod of 
  -	true ->
  -	    TestModName = list_to_atom(atom_to_list(OldModName) ++ "_tests"),
  -	    NewTestModName = list_to_atom(NewName++"_tests"),
  -	    do_rename_mod(FileName, [{OldModName, NewModName}, {TestModName, NewTestModName}], 
  -			  AnnAST, SearchPaths, emacs, TabWidth, Cmd);
  -	false ->
  -	    do_rename_mod(FileName, [{OldModName, NewModName}], AnnAST, SearchPaths, emacs, TabWidth, Cmd)
  -    end.
  -    
  +   
   do_rename_mod_1(Tree, {FileName, OldNewModPairs,Pid}) ->
       {AnnAST1, C1}=refac_util:full_tdTP(fun do_rename_mod_2/2, Tree, {FileName,OldNewModPairs, Pid}),
       {AnnAST2, C2} = case lists:member(eunit, refac_util:test_framework_used(FileName)) of 
  
positive.code: 	    {error, "New module name is the same as the old name."}
      end.
  
  
  do_rename_mod(FileName, OldNewModPairs, AnnAST, SearchPaths,Editor, TabWidth, Cmd) ->
      {OldModName, NewModName} = hd(OldNewModPairs),
  
negative.code: 
  -module(refac_rename_mod).
  
  -export([rename_mod/4, rename_mod_1/5, rename_mod_eclipse/4, rename_mod_1_eclipse/5]).
  
  -import(refac_rename_fun, [check_atoms/4, start_atom_process/0, 
  			   output_atom_warning_msg/3, stop_atom_process/1]).
  