[plt-scheme] DrScheme online syntax highlighting

From: Daniel Silva (dansilva at lynx.dac.neu.edu)
Date: Mon Nov 3 15:00:22 EST 2003

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.

> HTH,
> john

Thanks,
Daniel



Posted on the users mailing list.