anchor.diff:      {ok, {Mod, Fun, Arity, _, DefinePos}} = refac_util:pos_to_fun_name(AnnAST, {Line, Col}),
       ?wrangler_io("The current file under refactoring is:\n~p\n", [FileName]),
       Pid = start_atom_process(),
  -    {AnnAST1, _C} = do_rename_fun(FileName, SearchPaths, AnnAST, {Mod, Fun, Arity}, {DefinePos, NewName1}, Pid, TabWidth),
  +    {AnnAST1, _C} = do_rename_fun(FileName, SearchPaths, AnnAST, {Mod, Fun, Arity}, 
  +				  {DefinePos, NewName1}, Pid, TabWidth),
       case refac_util:is_exported({Fun, Arity}, Info) of
  -      true ->
  -	  ?wrangler_io("\nChecking client modules in the following search paths: \n~p\n", [SearchPaths]),
  -	  ClientFiles = refac_util:get_client_files(FileName, SearchPaths),
  -	  try
  -	    rename_fun_in_client_modules(ClientFiles, {Mod, Fun, Arity}, NewName, SearchPaths, TabWidth, Pid)
  -	  of
  -	    Results ->
  -		output_atom_warning_msg(Pid, not_renamed_warn_msg(Fun), renamed_warn_msg(Fun)),
  -		stop_atom_process(Pid),
  -		write_files(emacs, [{{FileName, FileName}, AnnAST1}| Results])
  -	  catch
  -	    throw:Err -> Err
  -	  end;
  -      false ->
  -	  output_atom_warning_msg(Pid, not_renamed_warn_msg(Fun), renamed_warn_msg(Fun)),
  -	  stop_atom_process(Pid),
  -	  write_files(emacs, [{{FileName, FileName}, AnnAST1}])
  +	true ->
  +	    ?wrangler_io("\nChecking client modules in the following search paths: \n~p\n", [SearchPaths]),
  +	    ClientFiles = refac_util:get_client_files(FileName, SearchPaths),
  +	    try
  +		rename_fun_in_client_modules(ClientFiles, {Mod, Fun, Arity}, NewName, SearchPaths, TabWidth, Pid)
  +		of
  +		Results ->
  +		    output_atom_warning_msg(Pid, not_renamed_warn_msg(Fun), renamed_warn_msg(Fun)),
  +		    stop_atom_process(Pid),
  +		    write_files(emacs, [{{FileName, FileName}, AnnAST1}| Results])
  +	    catch
  +		throw:Err -> Err
  +	    end;
  +	false ->
  +	    output_atom_warning_msg(Pid, not_renamed_warn_msg(Fun), renamed_warn_msg(Fun)),
  +	    stop_atom_process(Pid),
  +	    write_files(emacs, [{{FileName, FileName}, AnnAST1}])
       end.
   
   -spec(write_files/2::(Editor::atom(), Results::[{{filename(), filename()}, syntaxTree()}]) ->
  
positive.code: 			_ -> TestFrameWorkUsed = refac_util:test_framework_used(FileName),
  			     case TestFrameWorkUsed of
  				 [] -> ok;
  				 _ -> catch test_framework_aware_name_checking(TestFrameWorkUsed, OldFunName, Arity, NewFunName)			      		     
  			     end
  		    end
  	    end;
         true  ->
  	    {error, "This function is not defined in this module; a  function can only be renamed from the module where it is defined."}
      end.
  
  
  do_rename_fun(FileName, SearchPaths, Tree, {ModName, OldName, Arity}, {DefinePos, NewName}, Pid, TabWidth) ->
      refac_util:full_tdTP(fun do_rename_fun_1/2, Tree, {FileName, {ModName, OldName, Arity}, {DefinePos, NewName},SearchPaths, Pid, TabWidth}).
    
  do_rename_fun_1(Tree, {FileName, {M, OldName, Arity}, {DefinePos, NewName}, SearchPaths, Pid, TabWidth}) ->
      case refac_syntax:type(Tree) of
        function ->
  	  case get_fun_def_loc(Tree) of
  	    DefinePos ->
  		  N = refac_syntax:function_name(Tree),
  		  Cs = refac_syntax:function_clauses(Tree),
  		  N1 = refac_syntax:copy_attrs(N, refac_syntax:atom(NewName)),
  		  refac_io:format("N:\n~p\n", [N]),
  		  refac_io:format("N1:\n~p\n", [N1]),
  		  {copy_pos_attrs(Tree, refac_syntax:function(N1, Cs)), true};
  	    _ -> {Tree, false}
  	  end;
        application ->
  	  Operator = refac_syntax:application_operator(Tree),
  	  Arguments = refac_syntax:application_arguments(Tree),
  	  case get_fun_def_info(Operator) of 
  	      {Mod1, Fun1, Ari1, _} ->
  		  case lists:keysearch({Mod1, Fun1, Ari1}, 1, apply_style_funs()) of 
  		      {value, _} ->
  			  transform_apply_style_calls(FileName, Tree, {M, OldName, Arity}, NewName, SearchPaths, TabWidth);
  		      false ->case refac_syntax:type(Operator) of
  				  atom ->
  				      case get_fun_def_info(Operator) of
  					  {M, OldName, Arity, _} ->
  					      Operator1 = copy_pos_attrs(Operator, refac_syntax:atom(NewName)),
  					      Tree1 = copy_pos_attrs(Tree, refac_syntax:application(Operator1, Arguments)),
  					      {Tree1, true};
  					  _ -> {Tree, false}
  				      end;
  				  module_qualifier ->
  				      Mod = refac_syntax:module_qualifier_argument(Operator),
  				      Fun = refac_syntax:module_qualifier_body(Operator),
  				      case get_fun_def_info(Operator) of
  					  {M, OldName, Arity, _} ->
  					      Fun2 = copy_pos_attrs(Fun, refac_syntax:atom(NewName)),
  					      %% Need to change the fun_def annotation as well?
  					      Operator1 = copy_pos_attrs(Operator, refac_syntax:module_qualifier(Mod, Fun2)),
  					      Tree1 = copy_pos_attrs(Tree, refac_syntax:application(Operator1, Arguments)),
  					      {Tree1, true};
  					  _ -> {Tree, false}
  				      end;
  				  _ -> {Tree, false}
  			      end
  		  end
  	  end;
  	arity_qualifier ->
  	    Fun = refac_syntax:arity_qualifier_body(Tree),
  	    Fun_Name = refac_syntax:atom_value(Fun),
  	    Arg = refac_syntax:arity_qualifier_argument(Tree),
  	    Arg1 = refac_syntax:integer_value(Arg),
  	    DefMod = get_fun_def_mod(Fun),
  	    if (Fun_Name == OldName) and (Arg1 == Arity) and (DefMod == M) ->
  		    {copy_pos_attrs(Tree, refac_syntax:arity_qualifier(refac_syntax:atom(NewName), Arg)),true};
  	       true -> {Tree, false}
  	    end;
  	tuple -> do_rename_fun_in_tuples(Tree, {FileName, SearchPaths, M, OldName, NewName, Arity, Pid, TabWidth});		 
  	_ -> {Tree, false}
      end.
  
  
negative.code: 	    case lists:suffix(?DEFAULT_EUNIT_TEST_SUFFIX, NewFunName) of 
  		true ->
  		    ok;
  		_ -> 
  		    throw({warning,"Renaming will make this function no "
  			   "longer an EUnit test function, continue?"})
  	    end;
  	_ -> case lists:suffix(?DEFAULT_EUNIT_GENERATOR_SUFFIX,OldFunName) of 
  		 true ->
  		     case lists:suffix(?DEFAULT_EUNIT_GENERATOR_SUFFIX, NewFunName) of 
  			 true -> 
  			     ok;
  			 _ -> 
  			     throw({warning,"Renaming will make this function no longer "
  				    "an EUnit test generator function,continue?"})
  		     end;
  		 _ ->case lists:suffix(?DEFAULT_EUNIT_TEST_SUFFIX, NewFunName) of 
  			 true -> 
  			     throw({warning, "Renaming will make this function an "
  				    "EUnit test function, continue?"});		     
  			 _ ->
  			     case lists:suffix(?DEFAULT_EUNIT_GENERATOR_SUFFIX,NewFunName) of 
  				 true -> 
  				     throw({warning, "Renaming will make this function an "
  					    "EUnit test geneator function, continue?"});
  				  _ -> 
  				     ok
  			     end
  		     end
  	     end
      end.
  
  eqc_name_checking(UsedFrameWorks, OldFunName, Arity, NewFunName) ->
      case lists:keysearch(eqc_statem, 1, UsedFrameWorks) of 
  	{value,_} -> 
  	    eqc_statem_name_checking(OldFunName, Arity, NewFunName);
  	false -> ok
      end,
      case lists:keysearch(eqc, 1, UsedFrameWorks) of 
  	{value,_} -> 
  	    eqc_name_checking(atom_to_list(OldFunName), Arity, atom_to_list(NewFunName));
  	false -> ok
      end.
     
  eqc_name_checking(OldFunName, _Arity, NewFunName) ->
      case lists:prefix("prop_", OldFunName) of 
  	true -> 
  	    case lists:prefix("prop_", NewFunName) of 
  		true -> 
  		    ok;
  		false -> 
  		    throw({warning, "Renaming will make this function no longer a quickcheck property, continue?"})
  	    end;
  	false ->
  	    case lists:prefix("prop_", NewFunName) of 
  		true ->
  		    throw({warning, "Renaming will make this function a quickcheck property, continue?"});
  		false -> ok
  	    end
      end.
  	    
  
  