anchor.diff:        _ -> false
       end.
   
  --spec(check_atoms/4::(filename(), syntaxTree(), [atom()],pid()) ->ok).	     
  +-spec(check_atoms/4::(filename(), syntaxTree(), [atom()],pid()) ->ok).      
   check_atoms(FileName, Tree, AtomNames, Pid) ->
       F = fun (T) ->
   		case refac_syntax:type(T) of
  
positive.code:     ?wrangler_io("\nCMD: ~p:rename_fun( ~p, ~p, ~p, ~p,~p, ~p).\n", [?MODULE, FileName, Line, Col, NewName, SearchPaths, TabWidth]),
      case refac_util:is_fun_name(NewName) of
        true ->
  	    {ok, {AnnAST, Info}}=refac_util:parse_annotate_file(FileName, true, SearchPaths, TabWidth),
  	    NewName1 = list_to_atom(NewName),
  	    {ok, ModName} = get_module_name(Info),
  	    case refac_util:pos_to_fun_name(AnnAST, {Line, Col}) of
  		{ok, {Mod, Fun, Arity, _, DefinePos}} ->
  		    case {ModName, NewName1} =/= {Mod, Fun} of
  			true ->
  			    case pre_cond_check(FileName, Info, NewName1, Mod, Fun, Arity) of 
  				ok ->
  				    Pid = start_atom_process(),
  				    ?wrangler_io("The current file under refactoring is:\n~p\n", [FileName]),
  				    {AnnAST1, _C} = do_rename_fun(FileName, SearchPaths, AnnAST, {Mod, Fun, Arity}, {DefinePos, NewName1}, Pid, TabWidth),
  				    check_atoms(FileName, AnnAST1, [Fun], Pid),
  				    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,[Fun]),
  						    stop_atom_process(Pid),
  						    write_files(Editor, [{{FileName,FileName},AnnAST1} | Results])
  					    catch 
  						throw:Err -> 
  						    stop_atom_process(Pid),
  						    Err
  					    end;
  					false ->
  					    output_atom_warning_msg(Pid, [Fun]),
  					    stop_atom_process(Pid),
  					    write_files(Editor, [{{FileName,FileName},AnnAST1}])
  				    end;				
  				Others -> Others
  			    end;
  			_ -> case Editor of 
  				 emacs -> {ok, []};
  				 eclipse ->
  				     Res = [{FileName, FileName, refac_prettypr:print_ast(refac_util:file_format(FileName),AnnAST)}],
  				     {ok, Res}
  			     end
  		    end;
  		{error, _Reason} -> {error, "You have not selected a function name!"}
  	    end;
  	false -> {error, "Invalid new function name!"}
      end.
  
  -spec(rename_fun_1/6::(string(), integer(), integer(), string(), [dir()], integer()) ->
  	     {error, string()} | {ok, [filename()]}).
  rename_fun_1(FileName,Line, Col, NewName, SearchPaths, TabWidth) ->
      {ok, {AnnAST, Info}}=refac_util:parse_annotate_file(FileName, true, SearchPaths, TabWidth),
      NewName1 = list_to_atom(NewName),
      {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),
      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, [Fun]),
  		    stop_atom_process(Pid),
  		    write_files(emacs, [{{FileName, FileName}, AnnAST1} | Results])
  	    catch 
  		throw:Err -> Err
  	    end;
  	false ->
  	    output_atom_warning_msg(Pid, [Fun]),
  	    stop_atom_process(Pid),
  	    write_files(emacs, [{{FileName, FileName}, AnnAST1}])
      end.    
  
  -spec(write_files/2::(Editor::atom(), Results::[{{filename(), filename()}, syntaxTree()}]) ->
  	     {ok, [filename()]} | {ok, [{filename(), filename(), string()}]}).
  
negative.code: 		    NodeToks = get_toks(FileName, Node, TabWidth),
  		    try refac_epp:expand_macros(NodeToks, {Ms, UMs}) of
  			NewToks when is_list(NewToks)->
  			    case refac_parse:parse_exprs(NewToks++[{dot,{999,0}}]) of 
  				 {ok, Exprs} ->
  				    try erl_eval:exprs(Exprs, []) of 
  					{value, Val, _} -> {value, Val}
  				    catch
  					_:_ -> {error, no_value}
  				    end;
  				_ -> {error, no_value}
  			    end
  		    catch
  			_:__ -> {error, no_value}
  