[plt-scheme] DrScheme online syntax highlighting

From: John Clements (clements at brinckerhoff.org)
Date: Mon Nov 3 15:05:32 EST 2003

On Monday, November 3, 2003, at 02:59  PM, Daniel Silva wrote:

> On Mon, 2003-11-03 at 14:42, John Clements wrote:
>> On Monday, November 3, 2003, at 02:27  PM, Daniel Silva wrote:
>>> Does anybody who tried highlight.ss get errors like these when 
>>> loading
>>> scheme files?
>>> open-input-text-editor: end index outside the range [1997,3000]: 1024
>>> open-input-text-editor: end index outside the range [2596,4000]: 2011
>>> #<struct:object:/home/daniel/plt/collects/stepper/stepper-
>>> tool.ss:525:8>:1:0: read: expected a ')'
>> No idea, but the "#<struct....stepper-tool.ss:525:8>" is actually
>> DrScheme's definitions-text%.  This is because the stepper tool 
>> applies
>> a mixin to this text% to override several text% methods.
> It looks like stepper-definitions-text-mixin overrides on-insert and
> on-delete.  I override after-insert and after-delete to change the
> nearest sexp's style.  I didn't think that change-style would trigger
> on-insert or on-delete.
> Do drscheme:eval:traverse-program/multiple, syntax-case, expand, or
> drscheme:language:make-text/pos invoke on-insert or on-delete?  I'm
> using those to read sexps, and the combination of get-backward-sexp and
> get-forward-sexp to find the last sexp typed.

No, no, let me clarify.  The error that you're getting in all 
likelihood has
nothing whatsoever to do with the stepper.  Since the stepper is the 
one to mix something into drscheme's definitions-text, the object that 
the result of this composition (the text%) is given a source position in
the stepper.  Any error message in DrScheme that involves DrScheme's
definitions-text% will refer to it as a struct that comes from the 

Put another way:  rm -rf the stepper collection.  I claim that (with
high likelihood) the bug will still be present, and the error message 
look the same, except that the source position given will come from some
other tool.


Posted on the users mailing list.