anchor.diff:  alist_start([], _) -> {"[]", 2};
   alist_start(_, Max) when Max < 4 -> {"...", 3};
   alist_start([H|T], Max) when is_integer(H), H >= 16#20, H =< 16#7e ->  % definitely printable
  -    {L, Len} = alist([H|T], Max-1),
  -    {[$"|L], Len + 1};
  -alist_start([H|T], Max) when H =:= 9; H =:= 10; H =:= 13 ->   % show as space
  -    {L, Len} = alist(T, Max-1),
  -    {[$ |L], Len + 1};
  +    try alist([H|T], Max -1) of
  +        {L, Len} ->
  +            {[$"|L], Len + 1}
  +    catch
  +        throw:unprintable ->
  +            {R, Len} = list_body([H|T], Max-2),
  +            {[$[, R, $]], Len + 2}
  +    end;
  +alist_start([H|T], Max) when H =:= 9; H =:= 10; H =:= 13 ->
  +    try alist([H|T], Max -1) of
  +        {L, Len} ->
  +            {[$"|L], Len + 1}
  +    catch
  +        throw:unprintable ->
  +            {R, Len} = list_body([H|T], Max-2),
  +            {[$[, R, $]], Len + 2}
  +    end;
   alist_start(L, Max) ->
       {R, Len} = list_body(L, Max-2),
       {[$[, R, $]], Len + 2}.
  
positive.code:     ?assertEqual("hello", lists:flatten(format("~s", [<<"hello">>], 50))),
      ?assertEqual("hello", lists:flatten(format("~10s", [<<"hello">>], 50))),
      ok.
  -endif.
  
negative.code: alist([H|T], Max) when is_integer(H), H >= 16#20, H =< 16#7e ->     % definitely printable
      {L, Len} = alist(T, Max-1),
      {[H|L], Len + 1};
  alist([H|T], Max) when H =:= 9; H =:= 10; H =:= 13 ->
      {L, Len} = alist(T, Max-1),
      {[H|L], Len + 1};
  alist(_L, _Max) ->
      throw(unprintable).
  
  %% is the first character in the atom alphabetic & lowercase?
  atom_needs_quoting_start([H|T]) when H >= $a, H =< $z ->
  