|
38 | 38 | "Set *print-fn* to f." |
39 | 39 | [f] (set! *print-fn* f)) |
40 | 40 |
|
41 | | -(def ^:dynamic *flush-on-newline* true) |
42 | | -(def ^:dynamic *print-newline* true) |
43 | | -(def ^:dynamic *print-readably* true) |
44 | | -(def ^:dynamic *print-meta* false) |
45 | | -(def ^:dynamic *print-dup* false) |
46 | | -(def ^:dynamic *print-length* nil) |
47 | | -(def ^:dynamic *print-level* nil) |
| 41 | +(def |
| 42 | + ^{:dynamic true |
| 43 | + :doc "When set to true, output will be flushed whenever a newline is printed. |
| 44 | +
|
| 45 | + Defaults to true."} |
| 46 | + *flush-on-newline* true) |
| 47 | + |
| 48 | +(def |
| 49 | + ^{:dynamic true |
| 50 | + :doc "When set to logical false will drop newlines from printing calls. |
| 51 | + This is to work around the implicit newlines emitted by standard JavaScript |
| 52 | + console objects."} |
| 53 | + *print-newline* true) |
| 54 | + |
| 55 | +(def |
| 56 | + ^{:dynamic true |
| 57 | + :doc "When set to logical false, strings and characters will be printed with |
| 58 | + non-alphanumeric characters converted to the appropriate escape sequences. |
| 59 | +
|
| 60 | + Defaults to true"} |
| 61 | + *print-readably* true) |
| 62 | + |
| 63 | +(def |
| 64 | + ^{:dynamic true |
| 65 | + :doc "If set to logical true, when printing an object, its metadata will also |
| 66 | + be printed in a form that can be read back by the reader. |
| 67 | +
|
| 68 | + Defaults to false."} |
| 69 | + *print-meta* false) |
| 70 | + |
| 71 | +(def |
| 72 | + ^{:dynamic true |
| 73 | + :doc "When set to logical true, objects will be printed in a way that preserves |
| 74 | + their type when read in later. |
| 75 | +
|
| 76 | + Defaults to false."} |
| 77 | + *print-dup* false) |
| 78 | + |
| 79 | +(def |
| 80 | + ^{:dynamic true |
| 81 | + :doc "When set to logical true, objects will be printed in a way that preserves |
| 82 | + their type when read in later. |
| 83 | +
|
| 84 | + Defaults to false."} |
| 85 | + *print-length* nil) |
| 86 | + |
| 87 | +(def |
| 88 | + ^{:dynamic true |
| 89 | + :doc "*print-level* controls how many levels deep the printer will |
| 90 | + print nested objects. If it is bound to logical false, there is no |
| 91 | + limit. Otherwise, it must be bound to an integer indicating the maximum |
| 92 | + level to print. Each argument to print is at level 0; if an argument is a |
| 93 | + collection, its items are at level 1; and so on. If an object is a |
| 94 | + collection and is at a level greater than or equal to the value bound to |
| 95 | + *print-level*, the printer prints '#' to represent it. The root binding |
| 96 | + is nil indicating no limit."} |
| 97 | + *print-level* nil) |
48 | 98 |
|
49 | 99 | (defonce ^:dynamic *loaded-libs* nil) |
50 | 100 |
|
|
0 commit comments