1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-29 03:19:54 +00:00

Update doc doc.

This commit is contained in:
Calvin Rose 2020-04-23 12:15:12 -05:00
parent c6a782c0ce
commit c335bf5dc5

View File

@ -1557,7 +1557,7 @@
(print)) (print))
(defn doc* (defn doc*
"Get the documentation for a symbol in a given environment." "Get the documentation for a symbol in a given environment. Function form of doc."
[&opt sym] [&opt sym]
(cond (cond
@ -1591,7 +1591,10 @@
(print-index identity))) (print-index identity)))
(defmacro doc (defmacro doc
"Shows documentation for the given symbol." "Shows documentation for the given symbol, or can show a list of available bindings.
If sym is a symbol, will look for documentation for that symbol. If sym is a string
or is not provided, will show all lexical and dynamic bindings in the current environment with
that prefix (all bindings will be shown if no prefix is given)."
[&opt sym] [&opt sym]
~(,doc* ',sym)) ~(,doc* ',sym))