anchor.diff:              end
       end.
   
  -make_args(P,Ctxt,FunNameLoc) ->
  +make_args([], _, _, _, LeftBracket,RightBracket) ->
  +    beside(text(atom_to_list(LeftBracket)),text(atom_to_list(RightBracket)));
  +make_args(Pats, P,Ctxt,FunNameLoc,LeftBracket,RightBracket) ->
       {LeftBracketLine,LeftBracketCol} = 
  -	get_keyword_loc_after('(',Ctxt,FunNameLoc),
  -    {PatStartLine,PatStartCol} = 
  -	next_token_loc(Ctxt#ctxt.tokens,{LeftBracketLine,LeftBracketCol}),
  +	get_keyword_loc_after(LeftBracket,Ctxt,FunNameLoc),
  +    {{PatStartLine, PatStartCol}, {PatEndLine, _PatEndCol}} =
  +        refac_util:get_start_end_loc_with_comment(Pats),
       {RightBracketLine,RightBracketCol} =
  -	get_right_bracket_loc(Ctxt#ctxt.tokens,{LeftBracketLine,LeftBracketCol}),
  -    {PatEndLine,_PatEndCol} = 
  -	prev_token_loc(Ctxt#ctxt.tokens,{RightBracketLine,RightBracketCol}),
  +	get_right_bracket_loc(Ctxt#ctxt.tokens,{LeftBracketLine,LeftBracketCol},
  +                              LeftBracket, RightBracket),
       D0 = case {RightBracketLine,RightBracketCol}=={0,0} orelse 
  -	     RightBracketLine==PatEndLine
  +	     RightBracketLine==PatEndLine orelse PatEndLine==0
   	 of
   	     true ->
  -		 beside(P,floating(text(")")));
  +		 beside(P,text(atom_to_list(RightBracket)));
   	     _ ->
  -		 above(P,nest(RightBracketCol-PatStartCol,text(")")))
  +		 above(P,nest(RightBracketCol - PatStartCol,text(atom_to_list(RightBracket))))
   	 end,
       case {LeftBracketLine,LeftBracketCol}=={0,0} orelse 
  -	LeftBracketLine==PatStartLine of
  +	LeftBracketLine==PatStartLine orelse PatStartLine==0 of
      	true ->
  -	    beside(text("("),D0);
  +	    beside(text(atom_to_list(LeftBracket)),D0);
   	_ ->
  -	    above(text("("),nest(PatStartCol-LeftBracketCol,D0))
  -    end.
  -
  -make_rule_clause(N,P,G,B,Ctxt, SameLine) ->
  -    D = make_fun_clause_head(N,P,Ctxt,{0,0}),
  +	    above(text(atom_to_list(LeftBracket)),nest(PatStartCol-LeftBracketCol,D0))
  +    end.
  +
  +make_rule_clause(N,P,G,B, CsNode, Ctxt, SameLine) ->
  +    Pats =refac_syntax:clause_patterns(CsNode),
  +    D = make_fun_clause_head(N,P,Pats, Ctxt,{0,0}),
       append_rule_body(B,append_guard(G,D,Ctxt),Ctxt, SameLine).
   
   make_case_clause(P,G,B,CsNode,Ctxt,SameLine) ->
  
positive.code:     ToksAdded = NewToks1 -- OrigToks1,
      {1, length(ToksRemoved), length(ToksAdded)}.
  
  
  print_form(Form,Ctxt,Fun) ->
      Paper = Ctxt#ctxt.paper,
      Ribbon = Ctxt#ctxt.ribbon,
  
negative.code: 	       end,
      	    maybe_parentheses(D3, Prec, Ctxt);
  	application ->  
              {PrecL, Prec} = func_prec(),
              Op =refac_syntax:application_operator(Node),     
              Args = refac_syntax:application_arguments(Node),
              D = lay(Op,reset_check_bracket(set_prec(Ctxt, PrecL))),
              Sep = get_separator(Args, Ctxt, ","),
  	    Ctxt1 =case length(Args)==1 andalso 
                         lists:member(refac_syntax:type(hd(Args)),
                                      [macro, infix_expr]) of
                         true ->
                             Ctxt#ctxt{check_bracket=true};
                         false ->
                             Ctxt
                     end,
              As =seq(Args, floating(text(Sep)), reset_prec(Ctxt1), fun lay/2),
              D1 = case Args of
                       [] ->
  			 beside(D, beside(text("("), text(")")));
                       _ ->
                           ArgsD=lay_elems(fun refac_prettypr_0:par/1,As, Args, Ctxt),
                           {OpStartLoc,OpEndLoc}=get_start_end_loc(Op),
                           ArgsD1=make_args(Args, ArgsD,Ctxt,OpEndLoc,'(',')'),
                           LeftBracketLoc=get_keyword_loc_after('(', Ctxt, OpEndLoc),
                           append_elems(fun horizontal/1,
                                        {D, {OpStartLoc, OpEndLoc}},
                                        {ArgsD1, {LeftBracketLoc, LeftBracketLoc}})
                   end,
              maybe_parentheses(D1, Prec, Ctxt);
  	match_expr ->    
              {PrecL, Prec, PrecR} = inop_prec('='),
  	    Left = refac_syntax:match_expr_pattern(Node),
  	    Right = refac_syntax:match_expr_body(Node),
  	    D1 = lay(Left, reset_check_bracket(set_prec(Ctxt, PrecL))),
  	    D2 = lay(Right, reset_check_bracket(set_prec(Ctxt, PrecR))),
  	    {LStart, LEnd} = get_start_end_loc(Left),
  	    {RStart, REnd} = get_start_end_loc(Right),
              EqLoc = get_keyword_loc_after('=',Ctxt, LEnd),
              LeftEq=append_elems(fun refac_prettypr_0:horizontal/1, 
  				{D1, {LStart, LEnd}}, {text("="), {EqLoc, EqLoc}}),
              D3=append_elems(fun refac_prettypr_0:horizontal/1, 
                              {LeftEq, {LStart, EqLoc}},
  			    {D2,{RStart, REnd}}),
  	    maybe_parentheses(D3, Prec, Ctxt);
  	underscore ->
  