summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--changelog.md5
-rw-r--r--compiler/main.nim4
-rw-r--r--doc/basicopt.txt1
-rw-r--r--lib/pure/ioselectors.nim1
-rw-r--r--todo.txt1
-rw-r--r--tools/nimweb.nim2
6 files changed, 8 insertions, 6 deletions
diff --git a/changelog.md b/changelog.md
index 5ea921e75..448d1875a 100644
--- a/changelog.md
+++ b/changelog.md
@@ -81,4 +81,7 @@ This now needs to be written as:
 - Removed deprecated romans module from the stdlib and published it as separate
   Nimble package.
 - Removed deprecated gentabs module from the stdlib and published it as separate
-  Nimble package.
\ No newline at end of file
+  Nimble package.
+- The ``nim doc`` command is now an alias for ``nim doc2``, the second version of
+  the documentation generator. The old version 1 can still be accessed
+  via the new ``nim doc0`` command.
diff --git a/compiler/main.nim b/compiler/main.nim
index 0edbae16f..1e94a6ca0 100644
--- a/compiler/main.nim
+++ b/compiler/main.nim
@@ -186,12 +186,12 @@ proc mainCommand*(graph: ModuleGraph; cache: IdentCache) =
   of "php":
     gCmd = cmdCompileToPHP
     commandCompileToJS(graph, cache)
-  of "doc":
+  of "doc0":
     wantMainModule()
     gCmd = cmdDoc
     loadConfigs(DocConfig, cache)
     commandDoc()
-  of "doc2":
+  of "doc2", "doc":
     gCmd = cmdDoc
     loadConfigs(DocConfig, cache)
     defineSymbol("nimdoc")
diff --git a/doc/basicopt.txt b/doc/basicopt.txt
index 3b0271077..4db2d5af7 100644
--- a/doc/basicopt.txt
+++ b/doc/basicopt.txt
@@ -5,7 +5,6 @@
 Command:
   //compile, c                compile project with default code generator (C)
   //doc                       generate the documentation for inputfile
-  //doc2                      generate the documentation for inputfile
 
 Arguments:
   arguments are passed to the program being run (if --run option is selected)
diff --git a/lib/pure/ioselectors.nim b/lib/pure/ioselectors.nim
index ef8072221..1722da1c6 100644
--- a/lib/pure/ioselectors.nim
+++ b/lib/pure/ioselectors.nim
@@ -43,6 +43,7 @@ const bsdPlatform = defined(macosx) or defined(freebsd) or
                     defined(dragonfly)
 
 when defined(nimdoc):
+  type SocketHandle = int
   type
     Selector*[T] = ref object
       ## An object which holds descriptors to be checked for read/write status
diff --git a/todo.txt b/todo.txt
index ba137039e..f7bce4612 100644
--- a/todo.txt
+++ b/todo.txt
@@ -1,7 +1,6 @@
 version 1.0 battle plan
 =======================
 
-- make 'doc2' an alias for 'doc' and introduce 'doc0'
 - make 'break' not leave named blocks
 - make FlowVar compatible to Futures
 - fix "high priority" bugs
diff --git a/tools/nimweb.nim b/tools/nimweb.nim
index a082520e0..ffb1ac4e3 100644
--- a/tools/nimweb.nim
+++ b/tools/nimweb.nim
@@ -307,7 +307,7 @@ proc buildDoc(c: var TConfigData, destPath: string) =
       destPath / changeFileExt(splitFile(d).name, "html"), d]
     i.inc
   for d in items(c.srcdoc):
-    commands[i] = findNim() & " doc $# --git.url:$# -o:$# --index:on $#" %
+    commands[i] = findNim() & " doc0 $# --git.url:$# -o:$# --index:on $#" %
       [c.nimArgs, gitRepo,
       destPath / changeFileExt(splitFile(d).name, "html"), d]
     i.inc