diff --git a/collects/scribblings/guide/running.scrbl b/collects/scribblings/guide/running.scrbl index fa1622313e..081e8b446a 100644 --- a/collects/scribblings/guide/running.scrbl +++ b/collects/scribblings/guide/running.scrbl @@ -38,9 +38,8 @@ with a @litchar{> } prompt: > } -@margin-note{For enhancing your @tech{REPL} experience, see - @racketmodname[xrepl]; for information on GNU Readline support, see - @racketmodname[readline].} +@margin-note{For information on GNU Readline support, see +@racketmodname[readline].} To initialize the @tech{REPL}'s environment, @exec{racket} first requires the @racketmodname[racket/init] module, which provides all of diff --git a/collects/scribblings/guide/welcome.scrbl b/collects/scribblings/guide/welcome.scrbl index badb0548f6..f56f8ff12f 100644 --- a/collects/scribblings/guide/welcome.scrbl +++ b/collects/scribblings/guide/welcome.scrbl @@ -1,6 +1,5 @@ #lang scribble/doc @(require scribble/manual scribble/eval scribble/bnf "guide-utils.rkt" - (only-in scribble/core link-element) (for-label racket/enter)) @(define piece-eval (make-base-eval)) @@ -135,9 +134,6 @@ the above text in a file using your favorite editor. If you save it as @filepath{extract.rkt}, then after starting @exec{racket} in the same directory, you'd evaluate the following sequence: -@margin-note{If you use @racketmodname[xrepl], you can use - @(link-element "plainlink" (litchar ",enter extract.rkt") `(xrepl "enter")).} - @interaction[ #:eval piece-eval (eval:alts (enter! "extract.rkt") (void)) diff --git a/collects/scribblings/more/more.scrbl b/collects/scribblings/more/more.scrbl index 5b198a456e..ce9df39e19 100644 --- a/collects/scribblings/more/more.scrbl +++ b/collects/scribblings/more/more.scrbl @@ -2,58 +2,43 @@ @(require scribble/manual scribble/urls scribble/eval - (only-in scribble/core link-element) "../quick/keep.rkt" (for-label scheme racket/enter - xrepl readline net/url xml racket/control)) -@(begin +@(define quick @other-manual['(lib "quick.scrbl" "scribblings/quick")]) +@(define guide @other-manual['(lib "guide.scrbl" "scribblings/guide")]) -(define quick @other-manual['(lib "quick.scrbl" "scribblings/quick")]) -(define guide @other-manual['(lib "guide.scrbl" "scribblings/guide")]) +@(define more-eval (make-base-eval)) +@(interaction-eval #:eval more-eval + (define (show-load re?) + (fprintf (current-error-port) " [~aloading serve.rkt]\n" (if re? "re-" "")))) +@(interaction-eval #:eval more-eval + (define (serve n) void)) +@(interaction-eval #:eval more-eval + (define (show-break) + (fprintf (current-error-port) "^Cuser break"))) +@(interaction-eval #:eval more-eval + (define (show-fail n) + (error 'tcp-listen + "listen on ~a failed (address already in use)" + n))) +@(interaction-eval #:eval more-eval (require xml net/url)) -(define more-eval (make-base-eval)) -(interaction-eval #:eval more-eval - (define (show-load re?) - (fprintf (current-error-port) - " [~aloading serve.rkt]\n" (if re? "re-" "")))) -(interaction-eval #:eval more-eval - (define (serve n) void)) -(interaction-eval #:eval more-eval - (define (show-break) - (fprintf (current-error-port) "^Cuser break"))) -(interaction-eval #:eval more-eval - (define (show-fail n) - (error 'tcp-listen - "listen on ~a failed (address already in use)" - n))) -(interaction-eval #:eval more-eval (require xml net/url)) - -(define (whole-prog which [last? #f]) +@(define (whole-prog which [last? #f]) (let ([file (format "step~a.txt" which)]) (margin-note (keep-file file) "Here's the " - (if last? + (if last? "final program" "whole program so far") " in plain text: " (link file "step " which) "."))) -(define-syntax-rule (REQ m) @racket[(require @#,racketmodname[m])]) - -(define (xreplcmd name . args) - (define namestr (format ",~a" name)) - (define content - (litchar (if (null? args) namestr (apply string-append namestr " " args)))) - (link-element "plainlink" content `(xrepl ,(format "~a" name)))) - -) - @title{More: Systems Programming with Racket} @author["Matthew Flatt"] @@ -94,36 +79,20 @@ start @exec{racket} with no command-line arguments: > } -To get a richer read-eval-print-loop, evaluate @REQ[xrepl]. You will -get Readline-based input if you have GNU Readline installed on your -system, and a useful set of meta-commands to support exploration and -development. - -@interaction[ -(eval:alts @#,REQ[xrepl] (void)) -] - -To get this as a default, use the @xreplcmd{install!} command---your -@filepath{~/.racketrc} will be updated to load @racketmodname[xrepl] -whenever you start @exec{racket} for interactive evaluation. +If you're using a plain terminal, if you have GNU Readline installed +on your system, and if you'd like Readline support in @exec{racket}, +then evaluate @racket[(require readline)]. If you also evaluate +@racket[(install-readline!)], then your @filepath{~/.racketrc} is +updated to load Readline whenever you start @exec{racket} for +interactive evaluation. Readline is not needed if you're running a +shell inside Emacs or if you're on Windows and use a @exec{cmd} +window. @margin-note{Unfortunately, for legal reasons related to GPL vs. LGPL, - @exec{racket} cannot provide @racketmodname[xrepl] or Readline - automatically.} - -@; FIXME: probably needs revisions, and questionable whether readline -@; should be mentioned by itself. One thing to consider is that with -@; readline it's possible to pretend that the whole thing is one -@; session, whereas xrepl changes the prompt. - -If you want @emph{just} readline support in @exec{racket}, evaluate -@REQ[readline]. To install this in your @filepath{~/.racketrc}, -evaluate @racket[(install-readline!)]. Readline is not needed if you're -using @racketmodname[xrepl], if you're running a shell inside Emacs, or -if you're on Windows and use a @exec{cmd} window. + @exec{racket} cannot provide Readline automatically.} @interaction[ -(eval:alts @#,REQ[readline] (void)) +(eval:alts (require readline) (void)) (eval:alts (install-readline!) (void)) ] @@ -147,9 +116,6 @@ racket Back in @exec{racket}, try loading the file and running @racket[go]: -@margin-note{If you use @racketmodname[xrepl], you can use - @xreplcmd["enter"]{serve.rkt}.} - @interaction[ #:eval more-eval (eval:alts (enter! "serve.rkt") (show-load #f))