From 607c65fe4c4abc5efc6f38134b85a23d7c201d60 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 28 Jun 2008 02:47:11 +0000 Subject: [PATCH] doc fixes for transplant-input-port & related svn: r10484 --- .../scribblings/reference/custom-ports.scrbl | 19 ++++++++++--------- collects/scribblings/reference/port-lib.scrbl | 11 ++++++----- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/collects/scribblings/reference/custom-ports.scrbl b/collects/scribblings/reference/custom-ports.scrbl index f340ea050e..11a0e79d04 100644 --- a/collects/scribblings/reference/custom-ports.scrbl +++ b/collects/scribblings/reference/custom-ports.scrbl @@ -303,13 +303,13 @@ The arguments implement the port as follows: and the position for the next item in the port's stream (a positive number or @scheme[#f]). See also @secref["linecol"]. - This procedure is only called if line counting is enabled for the - port via @scheme[port-count-lines!] (in which case - @scheme[count-lines!] is called). The @scheme[read], - @scheme[read-syntax], @scheme[read-honu], and - @scheme[read-honu-syntax] procedures assume that reading a - non-whitespace character increments the column and position by - one.} + This procedure is called to implement @scheme[port-next-location], + but only if line counting is enabled for the port via + @scheme[port-count-lines!] (in which case @scheme[count-lines!] is + called). The @scheme[read], @scheme[read-syntax], + @scheme[read-honu], and @scheme[read-honu-syntax] procedures + assume that reading a non-whitespace character increments the + column and position by one.} @item{@scheme[count-lines!] --- a procedure of no arguments that is called if and when line counting is enabled for the port. @@ -943,8 +943,9 @@ procedures. stream (a positive number or @scheme[#f]). See also @secref["linecol"]. - This procedure is only called if line counting is enabled for the - port via @scheme[port-count-lines!] (in which case + This procedure is called to implement @scheme[port-next-location] + for the port, but only if line counting is enabled for the port + via @scheme[port-count-lines!] (in which case @scheme[count-lines!] is called).} @item{@scheme[count-lines!] --- a procedure of no arguments diff --git a/collects/scribblings/reference/port-lib.scrbl b/collects/scribblings/reference/port-lib.scrbl index 2135b49f16..9f07689efd 100644 --- a/collects/scribblings/reference/port-lib.scrbl +++ b/collects/scribblings/reference/port-lib.scrbl @@ -344,16 +344,17 @@ Like @scheme[relocate-input-port], but for output ports.} (or/c exact-nonnegative-integer? false/c) (or/c exact-positive-integer? false/c))) false/c)] - [init-pos (-> exact-positive-integer?)] + [init-pos exact-positive-integer?] [close? any/c #t] [count-lines! (-> any) void]) input-port?]{ Like @scheme[relocate-input-port], except that arbitrary position information can be produced (when line counting is enabled) via -@scheme[get-location]. If @scheme[get-location] is @scheme[#f], then -the port counts lines in the usual way starting from -@scheme[init-pos], independent of locations reported by @scheme[in]. +@scheme[get-location], which used as for @scheme[make-input-port]. If +@scheme[get-location] is @scheme[#f], then the port counts lines in +the usual way starting from @scheme[init-pos], independent of +locations reported by @scheme[in]. If @scheme[count-lines!] is supplied, it is called when line counting is enabled for the resulting port. The default is @scheme[void].} @@ -366,7 +367,7 @@ is enabled for the resulting port. The default is @scheme[void].} (or/c exact-nonnegative-integer? false/c) (or/c exact-positive-integer? false/c))) false/c)] - [init-pos (-> exact-positive-integer?)] + [init-pos exact-positive-integer?] [close? any/c #t] [count-lines! (-> any) void]) output-port?]{