diff --git a/compiler/docgen.nim b/compiler/docgen.nim
index 65cd8fdd4..14a8b35c2 100755
--- a/compiler/docgen.nim
+++ b/compiler/docgen.nim
@@ -881,3 +881,57 @@ proc CommandRst2TeX =
splitter = "\\-"
CommandRstAux(gProjectFull, TexExt)
+# ---------- forum ---------------------------------------------------------
+
+proc setupConfig*() =
+ setConfigVar("split.item.toc", "20")
+ setConfigVar("doc.section", """
+
+""")
+ setConfigVar("doc.section.toc", """
+
+ $sectionTitle
+
+
+""")
+ setConfigVar("doc.item", """
+$header
+
+$desc
+
+""")
+ setConfigVar("doc.item.toc", """
+ $name
+""")
+ setConfigVar("doc.toc", """
+""")
+ setConfigVar("doc.body_toc", """
+$tableofcontents
+
+$moduledesc
+$content
+
+""")
+ setConfigVar("doc.body_no_toc", "$moduledesc $content")
+ setConfigVar("doc.file", "$content")
+
+proc rstToHtml*(s: string): string =
+ ## exported for *nimforum*.
+ const filen = "input"
+ var d = newDocumentor(filen)
+ var dummyHasToc = false
+ var rst = rstParse(s, false, filen, 0, 1, dummyHasToc)
+ d.modDesc = renderRstToOut(d, rst)
+ let res = genOutFile(d)
+ result = res.ropeToStr
+
diff --git a/config/nimdoc.cfg b/config/nimdoc.cfg
index d9a5b1ae2..d47dccb63 100755
--- a/config/nimdoc.cfg
+++ b/config/nimdoc.cfg
@@ -1,5 +1,5 @@
# This is the config file for the documentation generator.
-# (c) 2011 Andreas Rumpf
+# (c) 2012 Andreas Rumpf
# Feel free to edit the templates as you need.
split.item.toc = "20"
diff --git a/config/nimdoc.tex.cfg b/config/nimdoc.tex.cfg
index ecb95fe01..8b59f2ee9 100755
--- a/config/nimdoc.tex.cfg
+++ b/config/nimdoc.tex.cfg
@@ -1,6 +1,6 @@
# This is the config file for the documentation generator that produces TeX
# output.
-# (c) 2011 Andreas Rumpf
+# (c) 2012 Andreas Rumpf
# Feel free to edit the templates as you need.
split.item.toc = "20"
diff --git a/tests/specials.nim b/tests/specials.nim
index d10452b98..05eda6061 100644
--- a/tests/specials.nim
+++ b/tests/specials.nim
@@ -15,7 +15,13 @@
const
rodfilesDir = "tests/rodfiles"
-proc delNimCache() = removeDir(rodfilesDir / "nimcache")
+proc delNimCache() =
+ let dir = rodfilesDir / "nimcache"
+ try:
+ removeDir(dir)
+ except EOS:
+ echo "[Warning] could not delete: ", dir
+
proc plusCache(options: string): string = return options & " --symbolFiles:on"
proc runRodFiles(r: var TResults, options: string) =