-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathclojure.main-api.html
More file actions
533 lines (449 loc) · 25.9 KB
/
Copy pathclojure.main-api.html
File metadata and controls
533 lines (449 loc) · 25.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>clojure.main - Clojure v1.12.4 API documentation</title>
<link rel="icon" href="static/favicon.png" />
<link rel="shortcut icon" href="static/favicon.png" />
<link rel="stylesheet" href="static/clojure.css" type="text/css" media="all" />
<link rel="stylesheet" href="static/wiki.css" type="text/css" media="all" />
<link rel="stylesheet" href="static/internal.css" type="text/css" media="all" />
<style>.menuWrapper{height: 36px;}</style>
</head>
<!--
This document was auto-generated from the source by the clojure autodoc system.
To report errors or ask questions about the overall documentation structure, formatting,
etc., contact Tom Faulhaber (google mail name: tomfaulhaber).
For errors in the documentation of a particular namespace, contact the author of that
namespace.
-->
<body>
<div id="AllContentContainer">
<div id="Header">
<a href="index.html" id="Logo"><img src="static/clojure-icon.gif" width="100" height="100" alt="Clojure" /></a>
<h1><a href="index.html" id="page-header" title="page header title">Clojure Core API Reference</a></h1>
</div>
<div id="leftcolumn"><div style="text-align: center;"></div>
<div class="menu">
<div class="WikiCustomNav WikiElement wiki">
<span class="toc-header"><span id="project-name">Clojure</span> <span id="version">v1.12.4</span> API</span><br />
<ul>
<li><a href="index.html" class="wiki_link">Overview</a></li>
<li><a href="api-index.html" class="wiki_link">API Index</a></li>
</ul>
<div class="NamespaceTOC">
<span class="toc-header">Namespaces</span>
<ul id="left-sidebar-list">
<li><a class="wiki_link" href="clojure.core-api.html">clojure.core</a></li><li><a class="wiki_link" href="clojure.data-api.html">clojure.data</a></li><li><a class="wiki_link" href="clojure.datafy-api.html">clojure.datafy</a></li><li><a class="wiki_link" href="clojure.edn-api.html">clojure.edn</a></li><li><a class="wiki_link" href="clojure.inspector-api.html">clojure.inspector</a></li><li><a class="wiki_link" href="clojure.instant-api.html">clojure.instant</a></li><li><a class="wiki_link" href="clojure.java.basis-api.html">clojure.java.basis</a></li><li><a class="wiki_link" href="clojure.java.browse-api.html">clojure.java.browse</a></li><li><a class="wiki_link" href="clojure.java.io-api.html">clojure.java.io</a></li><li><a class="wiki_link" href="clojure.java.javadoc-api.html">clojure.java.javadoc</a></li><li><a class="wiki_link" href="clojure.java.process-api.html">clojure.java.process</a></li><li><a class="wiki_link" href="clojure.java.shell-api.html">clojure.java.shell</a></li><li><a class="wiki_link" href="clojure.main-api.html">clojure.main</a></li><li><a class="wiki_link" href="clojure.math-api.html">clojure.math</a></li><li><a class="wiki_link" href="clojure.pprint-api.html">clojure.pprint</a></li><li><a class="wiki_link" href="clojure.reflect-api.html">clojure.reflect</a></li><li><a class="wiki_link" href="clojure.repl-api.html">clojure.repl</a></li><li><a class="wiki_link" href="clojure.set-api.html">clojure.set</a></li><li><a class="wiki_link" href="clojure.stacktrace-api.html">clojure.stacktrace</a></li><li><a class="wiki_link" href="clojure.string-api.html">clojure.string</a></li><li><a class="wiki_link" href="clojure.template-api.html">clojure.template</a></li><li><a class="wiki_link" href="clojure.test-api.html">clojure.test</a></li><li><a class="wiki_link" href="clojure.tools.deps.interop-api.html">clojure.tools.deps.interop</a></li><li><a class="wiki_link" href="clojure.walk-api.html">clojure.walk</a></li><li><a class="wiki_link" href="clojure.xml-api.html">clojure.xml</a></li><li><a class="wiki_link" href="clojure.zip-api.html">clojure.zip</a></li>
</ul>
</div>
<div class="BranchTOC">
<span class="toc-header">Other Versions</span>
<ul id="left-sidebar-branch-list">
<li><a class="wiki_link" href="index.html">v1.12.3 (stable)</a></li><li><a class="wiki_link" href="branch-master/index.html">v1.13 (in development)</a></li><li><a class="wiki_link" href="branch-clojure-1.11.4/index.html">v1.11.4 (legacy)</a></li><li><a class="wiki_link" href="branch-clojure-1.10.3/index.html">v1.10.3 (legacy)</a></li><li><a class="wiki_link" href="branch-clojure-1.9.0/index.html">v1.9 (legacy)</a></li><li><a class="wiki_link" href="branch-clojure-1.8.0/index.html">v1.8 (legacy)</a></li><li><a class="wiki_link" href="branch-clojure-1.7.0/index.html">v1.7 (legacy)</a></li><li><a class="wiki_link" href="branch-clojure-1.6.0/index.html">v1.6 (legacy)</a></li><li><a class="wiki_link" href="branch-clojure-1.5.0/index.html">v1.5 (legacy)</a></li><li><a class="wiki_link" href="branch-clojure-1.4.0/index.html">v1.4 (legacy)</a></li><li><a class="wiki_link" href="branch-1.3.x/index.html">v1.3 (legacy)</a></li><li><a class="wiki_link" href="branch-1.2.x/index.html">v1.2 (legacy)</a></li><li><a class="wiki_link" href="branch-1.1.x/index.html">v1.1 (legacy)</a></li>
</ul>
</div>
<a class="wiki_link" href="https://clojure.org">Clojure Home</a>
</div>
</div>
</div>
<div id="rightcolumn">
<div id="Content">
<div class="contentBox"><div class="innerContentBox">
<div class="wiki wikiPage" id="content_view">
<div id="right-sidebar"><div id="toc">
<h1 class="nopad">Table of Contents</h1>
<div class="toc-section" style="margin-left: 1em;">
<a style="margin-top: 3px;" href="#toc0">Overview</a>
</div><div class="toc-section" style="margin-left: 1em;">
<a style="margin-top: 3px;" href="#"></a>
</div><div class="toc-section" style="margin-left: 1em;">
<a style="margin-top: 3px;" href="#"></a>
</div><div class="toc-section" style="margin-left: 1em;">
<a style="margin-top: 3px;" href="#var-section">Vars and Functions</a>
<div class="toc-entry" style="margin-left: 1em;">
<a href="#clojure.main/demunge" class="toc-entry-anchor">demunge</a>
</div><div class="toc-entry" style="margin-left: 1em;">
<a href="#clojure.main/err->msg" class="toc-entry-anchor">err->msg</a>
</div><div class="toc-entry" style="margin-left: 1em;">
<a href="#clojure.main/ex-str" class="toc-entry-anchor">ex-str</a>
</div><div class="toc-entry" style="margin-left: 1em;">
<a href="#clojure.main/ex-triage" class="toc-entry-anchor">ex-triage</a>
</div><div class="toc-entry" style="margin-left: 1em;">
<a href="#clojure.main/load-script" class="toc-entry-anchor">load-script</a>
</div><div class="toc-entry" style="margin-left: 1em;">
<a href="#clojure.main/main" class="toc-entry-anchor">main</a>
</div><div class="toc-entry" style="margin-left: 1em;">
<a href="#clojure.main/renumbering-read" class="toc-entry-anchor">renumbering-read</a>
</div><div class="toc-entry" style="margin-left: 1em;">
<a href="#clojure.main/repl" class="toc-entry-anchor">repl</a>
</div><div class="toc-entry" style="margin-left: 1em;">
<a href="#clojure.main/repl-caught" class="toc-entry-anchor">repl-caught</a>
</div><div class="toc-entry" style="margin-left: 1em;">
<a href="#clojure.main/repl-exception" class="toc-entry-anchor">repl-exception</a>
</div><div class="toc-entry" style="margin-left: 1em;">
<a href="#clojure.main/repl-prompt" class="toc-entry-anchor">repl-prompt</a>
</div><div class="toc-entry" style="margin-left: 1em;">
<a href="#clojure.main/repl-read" class="toc-entry-anchor">repl-read</a>
</div><div class="toc-entry" style="margin-left: 1em;">
<a href="#clojure.main/repl-requires" class="toc-entry-anchor">repl-requires</a>
</div><div class="toc-entry" style="margin-left: 1em;">
<a href="#clojure.main/report-error" class="toc-entry-anchor">report-error</a>
</div><div class="toc-entry" style="margin-left: 1em;">
<a href="#clojure.main/root-cause" class="toc-entry-anchor">root-cause</a>
</div><div class="toc-entry" style="margin-left: 1em;">
<a href="#clojure.main/skip-if-eol" class="toc-entry-anchor">skip-if-eol</a>
</div><div class="toc-entry" style="margin-left: 1em;">
<a href="#clojure.main/skip-whitespace" class="toc-entry-anchor">skip-whitespace</a>
</div><div class="toc-entry" style="margin-left: 1em;">
<a href="#clojure.main/stack-element-str" class="toc-entry-anchor">stack-element-str</a>
</div><div class="toc-entry" style="margin-left: 1em;">
<a href="#clojure.main/with-bindings" class="toc-entry-anchor">with-bindings</a>
</div><div class="toc-entry" style="margin-left: 1em;">
<a href="#clojure.main/with-read-known" class="toc-entry-anchor">with-read-known</a>
</div>
</div><div class="toc-section" style="margin-left: 1em;">
<a style="margin-top: 3px;" href="#"></a>
</div>
</div>
</div>
<div id="content-tag"><h1 id="overview">API for <span id="clojure.main">clojure.main</span>
- <span id="header-project">Clojure</span> <span id="header-version">v1.12.4</span><span id="header-status-block"> (<span id="header-status">stable</span>)</span>
</h1>
<span id="author-line">by <span id="author-name">Stephen C. Gilardi and Rich Hickey</span><br /></span>
<br />Full namespace name: <span id="long-name">clojure.main</span>
<p></p>
<h2>Overview</h2>
<pre id="namespace-docstr">Top-level main function for Clojure REPL and scripts.</pre>
<br />
<div id="var-section">
<p></p>
<h2>Public Variables and Functions</h2>
<div id="var-entry">
<br />
<hr />
<h2 id="clojure.main/demunge">demunge</h2>
<span id="var-type">function</span><br />
<pre id="var-usage">Usage: (demunge fn-name)
</pre>
<pre id="var-docstr">Given a string representation of a fn class,
as in a stack trace element, returns a readable version.</pre>
<pre id="var-specs"></pre>
<span class="var-added"><span id="content">Added in Clojure version 1.3</span><br /></span>
<a id="var-source" href="https://github.com/clojure/clojure/blob/b81660ee9cc50d830c33f943dbda8606ebac3806/src/clj/clojure/main.clj#L28">Source</a>
</div><div id="var-entry">
<br />
<hr />
<h2 id="clojure.main/err->msg">err->msg</h2>
<span id="var-type">function</span><br />
<pre id="var-usage">Usage: (err->msg e)
</pre>
<pre id="var-docstr">Helper to return an error message string from an exception.</pre>
<pre id="var-specs"></pre>
<a id="var-source" href="https://github.com/clojure/clojure/blob/b81660ee9cc50d830c33f943dbda8606ebac3806/src/clj/clojure/main.clj#L342">Source</a>
</div><div id="var-entry">
<br />
<hr />
<h2 id="clojure.main/ex-str">ex-str</h2>
<span id="var-type">function</span><br />
<pre id="var-usage">Usage: (ex-str {:clojure.error/keys [phase source path line column symbol class cause spec], :as triage-data})
</pre>
<pre id="var-docstr">Returns a string from exception data, as produced by ex-triage.
The first line summarizes the exception phase and location.
The subsequent lines describe the cause.</pre>
<pre id="var-specs"></pre>
<span class="var-added"><span id="content">Added in Clojure version 1.10</span><br /></span>
<a id="var-source" href="https://github.com/clojure/clojure/blob/b81660ee9cc50d830c33f943dbda8606ebac3806/src/clj/clojure/main.clj#L268">Source</a>
</div><div id="var-entry">
<br />
<hr />
<h2 id="clojure.main/ex-triage">ex-triage</h2>
<span id="var-type">function</span><br />
<pre id="var-usage">Usage: (ex-triage datafied-throwable)
</pre>
<pre id="var-docstr">Returns an analysis of the phase, error, cause, and location of an error that occurred
based on Throwable data, as returned by Throwable->map. All attributes other than phase
are optional:
:clojure.error/phase - keyword phase indicator, one of:
:read-source :compile-syntax-check :compilation :macro-syntax-check :macroexpansion
:execution :read-eval-result :print-eval-result
:clojure.error/source - file name (no path)
:clojure.error/path - source path
:clojure.error/line - integer line number
:clojure.error/column - integer column number
:clojure.error/symbol - symbol being expanded/compiled/invoked
:clojure.error/class - cause exception class symbol
:clojure.error/cause - cause exception message
:clojure.error/spec - explain-data for spec error</pre>
<pre id="var-specs"></pre>
<span class="var-added"><span id="content">Added in Clojure version 1.10</span><br /></span>
<a id="var-source" href="https://github.com/clojure/clojure/blob/b81660ee9cc50d830c33f943dbda8606ebac3806/src/clj/clojure/main.clj#L207">Source</a>
</div><div id="var-entry">
<br />
<hr />
<h2 id="clojure.main/load-script">load-script</h2>
<span id="var-type">function</span><br />
<pre id="var-usage">Usage: (load-script path)
</pre>
<pre id="var-docstr">Loads Clojure source from a file or resource given its path. Paths
beginning with @ or @/ are considered relative to classpath.</pre>
<pre id="var-specs"></pre>
<a id="var-source" href="https://github.com/clojure/clojure/blob/b81660ee9cc50d830c33f943dbda8606ebac3806/src/clj/clojure/main.clj#L469">Source</a>
</div><div id="var-entry">
<br />
<hr />
<h2 id="clojure.main/main">main</h2>
<span id="var-type">function</span><br />
<pre id="var-usage">Usage: (main & args)
</pre>
<pre id="var-docstr">Usage: java -cp clojure.jar clojure.main [init-opt*] [main-opt] [arg*]
With no options or args, runs an interactive Read-Eval-Print Loop
init options:
-i, --init path Load a file or resource
-e, --eval string Evaluate expressions in string; print non-nil values
--report target Report uncaught exception to "file" (default), "stderr",
or "none", overrides System property clojure.main.report
main options:
-m, --main ns-name Call the -main function from a namespace with args
-r, --repl Run a repl
path Run a script from a file or resource
- Run a script from standard input
-h, -?, --help Print this help message and exit
operation:
- Establishes thread-local bindings for commonly set!-able vars
- Enters the user namespace
- Binds *command-line-args* to a seq of strings containing command line
args that appear after any main option
- Runs all init options in order
- Calls a -main function or runs a repl or script if requested
The init options may be repeated and mixed freely, but must appear before
any main option. The appearance of any eval option before running a repl
suppresses the usual repl greeting message: "Clojure ~(clojure-version)".
Paths may be absolute or relative in the filesystem or relative to
classpath. Classpath-relative paths have prefix of @ or @/</pre>
<pre id="var-specs"></pre>
<a id="var-source" href="https://github.com/clojure/clojure/blob/b81660ee9cc50d830c33f943dbda8606ebac3806/src/clj/clojure/main.clj#L617">Source</a>
</div><div id="var-entry">
<br />
<hr />
<h2 id="clojure.main/renumbering-read">renumbering-read</h2>
<span id="var-type">function</span><br />
<pre id="var-usage">Usage: (renumbering-read opts reader line-number)
</pre>
<pre id="var-docstr">Reads from reader, which must be a LineNumberingPushbackReader, while capturing
the read string. If the read is successful, reset the line number and re-read.
The line number on re-read is the passed line-number unless :line or
:clojure.core/eval-file meta are explicitly set on the read value.</pre>
<pre id="var-specs"></pre>
<span class="var-added"><span id="content">Added in Clojure version 1.10</span><br /></span>
<a id="var-source" href="https://github.com/clojure/clojure/blob/b81660ee9cc50d830c33f943dbda8606ebac3806/src/clj/clojure/main.clj#L139">Source</a>
</div><div id="var-entry">
<br />
<hr />
<h2 id="clojure.main/repl">repl</h2>
<span id="var-type">function</span><br />
<pre id="var-usage">Usage: (repl & options)
</pre>
<pre id="var-docstr">Generic, reusable, read-eval-print loop. By default, reads from *in*,
writes to *out*, and prints exception summaries to *err*. If you use the
default :read hook, *in* must either be an instance of
LineNumberingPushbackReader or duplicate its behavior of both supporting
.unread and collapsing CR, LF, and CRLF into a single \newline. Options
are sequential keyword-value pairs. Available options and their defaults:
- :init, function of no arguments, initialization hook called with
bindings for set!-able vars in place.
default: #()
- :need-prompt, function of no arguments, called before each
read-eval-print except the first, the user will be prompted if it
returns true.
default: (if (instance? LineNumberingPushbackReader *in*)
#(.atLineStart *in*)
#(identity true))
- :prompt, function of no arguments, prompts for more input.
default: repl-prompt
- :flush, function of no arguments, flushes output
default: flush
- :read, function of two arguments, reads from *in*:
- returns its first argument to request a fresh prompt
- depending on need-prompt, this may cause the repl to prompt
before reading again
- returns its second argument to request an exit from the repl
- else returns the next object read from the input stream
default: repl-read
- :eval, function of one argument, returns the evaluation of its
argument
default: eval
- :print, function of one argument, prints its argument to the output
default: prn
- :caught, function of one argument, a throwable, called when
read, eval, or print throws an exception or error
default: repl-caught</pre>
<pre id="var-specs"></pre>
<a id="var-source" href="https://github.com/clojure/clojure/blob/b81660ee9cc50d830c33f943dbda8606ebac3806/src/clj/clojure/main.clj#L368">Source</a>
</div><div id="var-entry">
<br />
<hr />
<h2 id="clojure.main/repl-caught">repl-caught</h2>
<span id="var-type">function</span><br />
<pre id="var-usage">Usage: (repl-caught e)
</pre>
<pre id="var-docstr">Default :caught hook for repl</pre>
<pre id="var-specs"></pre>
<a id="var-source" href="https://github.com/clojure/clojure/blob/b81660ee9cc50d830c33f943dbda8606ebac3806/src/clj/clojure/main.clj#L347">Source</a>
</div><div id="var-entry">
<br />
<hr />
<h2 id="clojure.main/repl-exception">repl-exception</h2>
<span id="var-type">function</span><br />
<pre id="var-usage">Usage: (repl-exception throwable)
</pre>
<pre id="var-docstr">Returns the root cause of throwables</pre>
<pre id="var-specs"></pre>
<a id="var-source" href="https://github.com/clojure/clojure/blob/b81660ee9cc50d830c33f943dbda8606ebac3806/src/clj/clojure/main.clj#L171">Source</a>
</div><div id="var-entry">
<br />
<hr />
<h2 id="clojure.main/repl-prompt">repl-prompt</h2>
<span id="var-type">function</span><br />
<pre id="var-usage">Usage: (repl-prompt)
</pre>
<pre id="var-docstr">Default :prompt hook for repl</pre>
<pre id="var-specs"></pre>
<a id="var-source" href="https://github.com/clojure/clojure/blob/b81660ee9cc50d830c33f943dbda8606ebac3806/src/clj/clojure/main.clj#L102">Source</a>
</div><div id="var-entry">
<br />
<hr />
<h2 id="clojure.main/repl-read">repl-read</h2>
<span id="var-type">function</span><br />
<pre id="var-usage">Usage: (repl-read request-prompt request-exit)
</pre>
<pre id="var-docstr">Default :read hook for repl. Reads from *in* which must either be an
instance of LineNumberingPushbackReader or duplicate its behavior of both
supporting .unread and collapsing all of CR, LF, and CRLF into a single
\newline. repl-read:
- skips whitespace, then
- returns request-prompt on start of line, or
- returns request-exit on end of stream, or
- reads an object from the input stream, then
- skips the next input character if it's end of line, then
- returns the object.</pre>
<pre id="var-specs"></pre>
<a id="var-source" href="https://github.com/clojure/clojure/blob/b81660ee9cc50d830c33f943dbda8606ebac3806/src/clj/clojure/main.clj#L153">Source</a>
</div><div id="var-entry">
<br />
<hr />
<h2 id="clojure.main/repl-requires">repl-requires</h2>
<span id="var-type">var</span><br />
<pre id="var-usage"></pre>
<pre id="var-docstr">A sequence of lib specs that are applied to `require`
by default when a new command-line REPL is started.</pre>
<pre id="var-specs"></pre>
<a id="var-source" href="https://github.com/clojure/clojure/blob/b81660ee9cc50d830c33f943dbda8606ebac3806/src/clj/clojure/main.clj#L354">Source</a>
</div><div id="var-entry">
<br />
<hr />
<h2 id="clojure.main/report-error">report-error</h2>
<span id="var-type">function</span><br />
<pre id="var-usage">Usage: (report-error t & {:keys [target], :or {target file}, :as opts})
</pre>
<pre id="var-docstr">Create and output an exception report for a Throwable to target.
Options:
:target - "file" (default), "stderr", "none"
If file is specified but cannot be written, falls back to stderr.</pre>
<pre id="var-specs"></pre>
<a id="var-source" href="https://github.com/clojure/clojure/blob/b81660ee9cc50d830c33f943dbda8606ebac3806/src/clj/clojure/main.clj#L585">Source</a>
</div><div id="var-entry">
<br />
<hr />
<h2 id="clojure.main/root-cause">root-cause</h2>
<span id="var-type">function</span><br />
<pre id="var-usage">Usage: (root-cause t)
</pre>
<pre id="var-docstr">Returns the initial cause of an exception or error by peeling off all of
its wrappers</pre>
<pre id="var-specs"></pre>
<span class="var-added"><span id="content">Added in Clojure version 1.3</span><br /></span>
<a id="var-source" href="https://github.com/clojure/clojure/blob/b81660ee9cc50d830c33f943dbda8606ebac3806/src/clj/clojure/main.clj#L35">Source</a>
</div><div id="var-entry">
<br />
<hr />
<h2 id="clojure.main/skip-if-eol">skip-if-eol</h2>
<span id="var-type">function</span><br />
<pre id="var-usage">Usage: (skip-if-eol s)
</pre>
<pre id="var-docstr">If the next character on stream s is a newline, skips it, otherwise
leaves the stream untouched. Returns :line-start, :stream-end, or :body
to indicate the relative location of the next character on s. The stream
must either be an instance of LineNumberingPushbackReader or duplicate
its behavior of both supporting .unread and collapsing all of CR, LF, and
CRLF to a single \newline.</pre>
<pre id="var-specs"></pre>
<a id="var-source" href="https://github.com/clojure/clojure/blob/b81660ee9cc50d830c33f943dbda8606ebac3806/src/clj/clojure/main.clj#L107">Source</a>
</div><div id="var-entry">
<br />
<hr />
<h2 id="clojure.main/skip-whitespace">skip-whitespace</h2>
<span id="var-type">function</span><br />
<pre id="var-usage">Usage: (skip-whitespace s)
</pre>
<pre id="var-docstr">Skips whitespace characters on stream s. Returns :line-start, :stream-end,
or :body to indicate the relative location of the next character on s.
Interprets comma as whitespace and semicolon as comment to end of line.
Does not interpret #! as comment to end of line because only one
character of lookahead is available. The stream must either be an
instance of LineNumberingPushbackReader or duplicate its behavior of both
supporting .unread and collapsing all of CR, LF, and CRLF to a single
\newline.</pre>
<pre id="var-specs"></pre>
<a id="var-source" href="https://github.com/clojure/clojure/blob/b81660ee9cc50d830c33f943dbda8606ebac3806/src/clj/clojure/main.clj#L121">Source</a>
</div><div id="var-entry">
<br />
<hr />
<h2 id="clojure.main/stack-element-str">stack-element-str</h2>
<span id="var-type">function</span><br />
<pre id="var-usage">Usage: (stack-element-str el)
</pre>
<pre id="var-docstr">Returns a (possibly unmunged) string representation of a StackTraceElement</pre>
<pre id="var-specs"></pre>
<span class="var-added"><span id="content">Added in Clojure version 1.3</span><br /></span>
<a id="var-source" href="https://github.com/clojure/clojure/blob/b81660ee9cc50d830c33f943dbda8606ebac3806/src/clj/clojure/main.clj#L62">Source</a>
</div><div id="var-entry">
<br />
<hr />
<h2 id="clojure.main/with-bindings">with-bindings</h2>
<span id="var-type">macro</span><br />
<pre id="var-usage">Usage: (with-bindings & body)
</pre>
<pre id="var-docstr">Executes body in the context of thread-local bindings for several vars
that often need to be set!: *ns* *warn-on-reflection* *math-context*
*print-meta* *print-length* *print-level* *compile-path*
*command-line-args* *1 *2 *3 *e</pre>
<pre id="var-specs"></pre>
<a id="var-source" href="https://github.com/clojure/clojure/blob/b81660ee9cc50d830c33f943dbda8606ebac3806/src/clj/clojure/main.clj#L76">Source</a>
</div><div id="var-entry">
<br />
<hr />
<h2 id="clojure.main/with-read-known">with-read-known</h2>
<span id="var-type">macro</span><br />
<pre id="var-usage">Usage: (with-read-known & body)
</pre>
<pre id="var-docstr">Evaluates body with *read-eval* set to a "known" value,
i.e. substituting true for :unknown if necessary.</pre>
<pre id="var-specs"></pre>
<a id="var-source" href="https://github.com/clojure/clojure/blob/b81660ee9cc50d830c33f943dbda8606ebac3806/src/clj/clojure/main.clj#L361">Source</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="foot">
<div id="copyright" style="text-align: center;">Copyright 2007-2025 by Rich Hickey</div>
</div>
</div>
<div id="DesignedBy">Logo & site design by <a href="http://www.tomhickey.com" title="Visit Tom Hickey's website.">Tom Hickey</a>.<br />
Clojure auto-documentation system by Tom Faulhaber.</div>
</div>
<!-- /AllContentContainer -->
</body>
</html>