anchor.diff:               _         -> {function, DefNameSym}
              end,
   
  -  %% Analyze methods' args but not the body, we just want arity information
  +  %% If it is a def analyze methods' args but not the body, 
  +  %% we just want arity information first.
     {MethodsExprs, Env2} =
  -    analyze_fn_methods(Env1, MethodsList, LoopId, IsOnce, false),
  +    analyze_fn_methods(Env1, MethodsList, LoopId, IsOnce, not IsDef),
   
     MethodArityFun = fun (#{fixed_arity := Arity}) -> Arity end,
     IsVariadicFun  = fun (#{'variadic?' := true}) -> true;
  
positive.code:                   false -> clj_core:seq2(Methods)
                  end,
  
    %% Add the name of the fn as a local with a modified name so that we can
    %% identify the fun as a clojure function when evaluated with erl_eval
    %% (see clojerl.erlang.Fn)
    PrefixNameSym = 'clojerl.erlang.Fn':prefix(NameSym),
    LocalExpr     = #{op => local, name => PrefixNameSym},
    Env0          = clj_env:put_local( clj_env:add_locals_scope(Env)
                                     , NameSym
                                     , LocalExpr
                                     ),
  
    %% If there is a def var we add it to the local scope
    DefVarNsSym = clj_env:current_ns(Env),
    DefNameSym  = case get_def_name(Env) of
                    undefined -> clj_core:symbol(<<>>);
                    DNS -> DNS
                  end,
    DefVar      = 'clojerl.Var':new( clj_core:name(DefVarNsSym)
                                   , clj_core:name(DefNameSym)
                                   ),
    Env1        = clj_env:update_var(Env0, DefVar),
  
    OpMeta      = clj_core:meta(Op),
    OnceKeyword = clj_core:keyword(<<"once">>),
  
negative.code: 
  -spec macroexpand_1(clj_env:env(), 'clojerl.List':type()) -> any().
  macroexpand_1(Env, Form) ->
    Op       = clj_core:first(Form),
    IsSymbol = clj_core:'symbol?'(Op),
    IsVar    = clj_core:'var?'(Op),
  
    {MacroVar, Env1} = if
                         IsSymbol -> lookup_var(Op, false, Env);
                         IsVar ->
                           VarSymbol = clj_core:symbol( clj_core:namespace(Op)
                                                      , clj_core:name(Op)
                                                      ),
                           lookup_var(VarSymbol, false, Env);
                         true ->
                           {undefined, Env}
                       end,
  
    case
      not is_special(Op)
      andalso (MacroVar =/= undefined)
      andalso ('clojerl.Var':is_macro(MacroVar))
    of
      true ->
        Var = clj_core:deref(MacroVar),
        Args = [Form, Env1] ++ clj_core:seq(clj_core:rest(Form)),
        try clj_core:invoke(Var, Args)
        catch throw:Error ->
            clj_utils:throw(Error, clj_reader:location_meta(Form))
        end;
      false -> Form
    end.
  
  -spec macroexpand(clj_env:env(), 'clojerl.List':type()) -> any().
  