anchor.diff:  
       AppName = bname(AppDir),
       ?log("Generating XML for application ~s ~p -> ~p", [AppName,AppDir,Dest]),
  -    case (catch edoc:application(list_to_atom(AppName), AppDir, Opts)) of
  +    case catch (edoc:application(list_to_atom(AppName), AppDir, Opts)) of
           ok ->
               Accr = fun (Filename, Acc) -> [Filename|Acc] end,
               XmlFiles = filelib:fold_files(Dest, ".+\\.xml$", false, Accr, []),
  
positive.code: 
      Index =
          lists:map(
                fun ([A,B,C,[]]) ->
                        fmt("['~s','~s','~s',[]]",
                          [html_encode(A),html_encode(B),html_encode(C)]);
                    ([A,B,C,D]) ->
                        fmt("['~s','~s','~s','~s']",
                          [html_encode(A),html_encode(B),html_encode(C),html_encode(D)])
                end,
                lists:sort(fun sort_index/2, lists:map(F, FIndex))),
  
      Js = fmt("var index = [~s];",
               [string:join([[C || C <- I, C /= $\n, C /= $\r] || I <- Index], ",")]),
  
      ok = file:write_file([dest(Conf), "/erldocs_index.js"], Js).
  
  render (cref, App, Mod, Xml, Types, Conf) ->
      render(erlref, App, Mod, Xml, Types, Conf);
  
  render (erlref, App, Mod, Xml, Types, Conf) ->
  
      File = filename:join([dest(Conf), App, Mod++".html"]),
      ok   = filelib:ensure_dir(dname(File) ++ "/"),
  
      Acc = [{ids,[]}, {list,ul}, {functions,[]}, {types,Types}],
  
  
negative.code: 
  ensure_docsrc (Conf, AppDir) ->
      %% List any doc/src/*.xml files that exist in the source files
      XMLFiles = filelib:wildcard(jname([AppDir, "doc", "src", "*.xml"])),
      HandWritten = [bname(File, ".xml") || File <- XMLFiles],
  
      ErlFiles = filelib:wildcard(jname([AppDir,        "*.erl"]))
          ++     filelib:wildcard(jname([AppDir, "src", "*.erl"])),
  
      %% Generate any missing module XML
      SrcFiles = [filename:absname(File) ||
  