anchor.diff:              throw({error, "Invalid new funname."})
       end.
           
  -            
  -%% refac_io:format("\n~p\n", [rename_fun_extended:rename_fun({filter, file, fun(File) -> true end}, {filter, fun(F)-> true end}, {filter, fun(A)-> true end}, {user_input, fun({M,F,A})->lists:flatten(io_lib:format("New function name for ~p:~p/~p", [M,F,A])) end}, ["c:/cygwin/home/hl/test"])]).
  -
  -
  -
  -%% -spec rename_fun(ModOrFile::{filter, file,  fun((File::filename()) -> boolean())}|
  -%%                             {filter, module, fun((Mod::atom()) -> boolean())} |
  -%%                             atom()|filename(),
  -%%                  OldFunName::{filter, fun((FunName::atom())-> boolean())}|atom(), 
  -%%                  Arity::{filter, fun((Arity::integer())->boolean())}|integer(),
  -%%                  NewFunName::{generator, fun(({M::atom(),F::atom(),A::integer()})->atom())}|
  -%%                              {user_input, Prompt::fun(({M::atom(), F::atom(),A::integer()})->
  -%%                                                              string())}|atom(),
  -%%                  SearchPaths::[filename()|dir()]) ->
  -%%                         [{wranlger_api, rename_fun, [any()]}]. 
  
positive.code: gen_question(gen_fun, {File, F, A, _Expr}) ->
      M=list_to_atom(filename:basename(File, ".erl")),
      lists:flatten(io_lib:format("Do you want to generalise function ~p:~p/~p over the expression(s) highlighted?",
                                  [M,F,A])).
  
  swap_args({ModOrFile, FunName, Arity}, Index1, Index2, SearchPaths) ->
      Files= get_files(ModOrFile, SearchPaths),
  
negative.code:     
        
  rename_fun_1(File, OldFunName, Arity, NewFunName, SearchPaths) ->
      FAs= get_fun_arity(File, OldFunName, Arity),
      [{refactoring, {refac_rename_fun, rename_fun_by_name, 
                      [File, F, A, new_name_gen(File, F, A, NewFunName), 
                       SearchPaths, composite_emacs]}, gen_question(rename_fun,{File, F,A})}
  