From a93ee701fd66f7b3119e25744aedc0954dc8545b Mon Sep 17 00:00:00 2001 From: "William J. Bowman" Date: Sun, 24 Nov 2013 22:54:38 -0500 Subject: [PATCH] * Changed parsing for #:escape-id to use a peeking-input-port. pkgs/scribble-pkgs/scribble-lib/scribble/comment-reader.rkt original commit: c77affa143c4739ff140e2df69aac38aee1fffb3 --- .../scribble-lib/scribble/comment-reader.rkt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/scribble-pkgs/scribble-lib/scribble/comment-reader.rkt b/pkgs/scribble-pkgs/scribble-lib/scribble/comment-reader.rkt index 2b4c4999..049e8015 100644 --- a/pkgs/scribble-pkgs/scribble-lib/scribble/comment-reader.rkt +++ b/pkgs/scribble-pkgs/scribble-lib/scribble/comment-reader.rkt @@ -1,4 +1,5 @@ (module comment-reader scheme/base + (require (only-in racket/port peeking-input-port)) (provide (rename-out [*read read] [*read-syntax read-syntax]) @@ -17,12 +18,10 @@ (read-syntax/recursive src port))) (define (read-unsyntaxer port) - (let-values ([(l c p) (port-next-location port)]) - (if (eq? (read port) '#:escape-id) - (read port) - (begin - (set-port-next-location! port l c p) - 'unsyntax)))) + (let ([p (peeking-input-port port)]) + (if (eq? (read p) '#:escape-id) + (begin (read port) (read port)) + 'unsyntax))) (define (make-comment-readtable #:readtable [rt (current-readtable)]) (make-readtable rt