API for repl-ln - clojure-contrib v1.1 (stable)

by Stephen C. Gilardi

Usage:
(ns your-namespace
  (:require clojure.contrib.repl-ln))

Overview

A repl with that provides support for lines and line numbers in the
input stream.

Public Variables and Functions



print-repl-info

function
Usage: (print-repl-info)
Prints info about the current repl
Source


repl

function
Usage: (repl & options)
A repl that supports line numbers. For definitions and evaluations made
at the repl, the repl-name and line number will be reported as the
origin. Use set-repl-name and set-repl-prompt to customize the repl name
and prompt. This repl supports all of the keyword arguments documented
for clojure.main/repl with the following change and additions:

     - :prompt has a new default
       default: #(clojure.core/print (repl-prompt))

     - :name-fmt, Name format string
       default: the name-fmt of the parent repl, or "repl-%S"

     - :prompt-fmt, Prompt format string
       default: the prompt-fmt of the parent repl, or "%S:%L %N=> "
Source


repl-info

function
Usage: (repl-info)
Returns a map of info about the current repl
Source


repl-prompt

function
Usage: (repl-prompt)
Returns the current repl prompt based on this repl's prompt-fmt
Source


set-repl-name

function
Usage: (set-repl-name)
       (set-repl-name name-fmt)
Sets the repl name format to the string name-fmt. Include the following
codes in the name to make the corresponding dynamic values part of it:

  %S - repl serial number
  %T - thread id
  %D - nesting depth in this thread

With no arguments, resets the repl name to its default: "repl-%S"
Source


set-repl-prompt

function
Usage: (set-repl-prompt)
       (set-repl-prompt prompt-fmt)
Sets the repl prompt. Include the following codes in the prompt to make
the corresponding dynamic values part of it:

  %S - repl serial number
  %T - thread id
  %D - nesting depth in this thread
  %L - input line number
  %N - namespace name

With no arguments, resets the repl pompt to its default: "%S:%L %N=> "
Source


stream-repl

function
Usage: (stream-repl & options)
Repl entry point that provides convenient overriding of input, output,
and err streams via sequential keyword-value pairs. Default values
for :in, :out, and :err are streams associated with System/in,
System/out, and System/err using UTF-8 encoding. Also supports all the
options provided by clojure.contrib.repl-ln/repl.
Source
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.