anchor.diff:  indent_type('match-spec') -> 0;
   indent_type(_) -> none.
   
  -%% map(Map, Depth, Indentation, LineLength).
  -%%  Print a map, attempting to keep key value pairs on the same line.
  -
  -map(Map, D, I, L) ->
  -    map(fun maps:to_list/1, Map, "#M(", D, I, L).
  -
  -%% map(Fun, Map, Prefix, Depth, Indentation, LineLength).
  -%%  Print a map, attempting to keep key value pairs on the same line.
  -%%  Fun must return a list of {Key, Value}, e.g. maps:to_list/1.
  -%%  Prefix is a iolist, namely "#M(" or "(map ".
  -
  -map(F, Map, P, D, I, L) ->
  -    PLen = length(P),
  -    Body = map_body(F(Map), I+PLen, D, I+PLen, L-1),
  -    case is_list(Map) andalso length(Map) rem 2 =:=1 of
  -      true  -> [P,Body,$\s,term(lists:last(Map), D, 0, 99999),$)];
  -      false -> [P,Body,$)]
  -    end.
  -
  -map_body([], _, _, _, _) -> [];
  -map_body([{K,V}|KVs], CurL, D, I, L) ->
  +%% map(KVs, Depth, Indentation, LineLength).
  +%% map_body(KVs, CurrentLineIndent, Depth, Indentation, LineLength)
  +
  +map_body(KVs, D, I, L) ->
  +    map_body(KVs, I, D, I, L-1).
  +
  +map_body([K,V|KVs], CurL, D, I, L) ->
       case map_assoc(K, V, CurL, D, I, L) of
  -        {join,KVcs,KVl} ->
  +        {both_fit,KVcs,KVl} ->			%Both fit on this line
               [KVcs,map_rest(KVs, CurL+KVl, D-1, I, L)];
  -        {break,KVcs,KVl} ->
  +        {both_line,KVcs,KVl} ->			%Both fit on single line
               [KVcs,map_rest(KVs, I+KVl, D-1, I, L)];
  -        {break,KVcs} ->
  +        {break,KVcs} ->		                %On separate lines
               %% Force a break after K/V split.
               [KVcs,map_rest(KVs, L, D-1, I, L)]
  -    end.
  +    end;
  +map_body(E, CurL, D, I, L) ->
  +    map_last(E, CurL, D, I, L).
  +
  +%% map_rest(KVs, Depth, Indentation, LineLength)
  +%% map_rest(KVs, CurrentLineIndent, Depth, Indentation, LineLength)
  +
  +map_rest(KVs, D, I, L) ->
  +    map_rest(KVs, I, D, I, L-1).
   
   map_rest([], _, _, _, _) -> "";
   map_rest(_, _, 0, _, _) -> " ...";
  -map_rest([{K,V}|KVs], CurL, D, I, L) ->
  +map_rest([K,V|KVs], CurL, D, I, L) ->
       case map_assoc(K, V, CurL+1, D, I, L) of
  -        {join,KVcs,KVl} ->
  +        {both_fit,KVcs,KVl} ->			%Both fit on this line
               [$\s,KVcs,map_rest(KVs, CurL+KVl+1, D-1, I, L)];
  -        {break,KVcs,KVl} ->
  +        {both_line,KVcs,KVl} ->		        %Both fit on single line
               [newline(I, KVcs),map_rest(KVs, I+KVl, D-1, I, L)];
  -        {break,KVcs} ->
  +        {break,KVcs} ->				%On separate lines
               %% Force a break after K/V split.
               [newline(I, KVcs),map_rest(KVs, L, D-1, I, L)]
  -    end.
  +    end;
  +map_rest(E, CurL, D, I, L) ->
  +    map_last(E, CurL, D, I, L).
  +
  +map_last(Tail, CurL, D, I, L) ->
  +    list_tail(Tail, CurL, D, I, L).
   
   map_assoc(K, V, CurL, D, I, L) ->
       Kcs = term(K, D, 0, 99999),                 %Never break the line
  
positive.code: term([comma,E], D, I, L) -> [",",term(E, D, I+1, L)];
  term(['comma-at',E], D, I, L) -> [",@",term(E, D, I+2, L)];
  term([map|MapBody], D, I, L) ->
      F = fun F([K,V|KVs]) -> [{K,V}|F(KVs)]; F(_) -> [] end,
      map(F, MapBody, "(map ", D, I, L);
  term([Car|_]=List, D, I, L) ->
      %% Handle printable lists specially.
      case io_lib:printable_unicode_list(List) of
  
negative.code: term(Bit, D, _, _) when is_bitstring(Bit) ->
      bitstring(Bit, D);                          %First D bytes
  term(Map, D, I, L) when ?IS_MAP(Map) ->
      Fun = fun (K, V, Acc) -> [K,V|Acc] end,
      Mcs = map_body(maps:fold(Fun, [], Map), D, I+3, L),
      ["#M(",Mcs,$)];
  term(Other, _, _, _) ->
      lfe_io_write:term(Other).                   %Use standard LFE for rest
  
  