diff --git a/collects/readline/doc.txt b/collects/readline/doc.txt index 5720d10552..c68bafbcce 100644 --- a/collects/readline/doc.txt +++ b/collects/readline/doc.txt @@ -11,16 +11,21 @@ The _rep.ss_ library installs a readline-based input port, and hooks the prompt-and-read part of MzScheme's read-eval-print loop to interact with it. -You can put the following in your ~/.mzschemerc so that MzScheme -starts with readline support on xterms: - - (when (regexp-match? #rx"xterm" (getenv "TERM")) - (dynamic-require '(lib "rep.ss" "readline") #f)) - -or start MzScheme with +You can start MzScheme with mzscheme -L rep.ss readline +or you can put the following in your ~/.mzschemerc so that MzScheme +starts with readline support when appropriate: + + (when (and (regexp-match? #rx"xterm" (getenv "TERM")) + (terminal-port? (current-input-port))) + (dynamic-require '(lib "rep.ss" "readline") #f)) + +(The first condition rules out running in dumb terminals, eg, inside +Emacs, and the second condition avoids using it when input is +redirected.) + The readline history is stored across invocations in MzScheme's preferences file, assuming MzScheme exits normally.