[plt-scheme] handling user-breaks in MrEd app...

From: Neil W. Van Dyke (neil at neilvandyke.org)
Date: Thu Oct 31 10:31:48 EST 2002

Speaking as one contributor to the abominable kludge that is Emacs... :)

First, I really like the Check Syntax stuff in DrScheme, and am happy
with it being invoked only via explicit command.

Second, if some enterprising hacker wants to delve into DrScheme
internals, one enhancement that'd be really appealing is "dumb syntax
coloring."  This would be used as fallback when the buffer does not have
current Check Syntax information.  It would color only comments, parens,
and self-evaluating forms -- things that, barring unusual reader macros,
can be determined reliably and quickly.  If the user starts editing
after running Check Syntax, then the coloring based on Check Syntax info
disappears but the comment/paren/selfeval coloring remains.

I suspect the dumb syntax coloring could respond incrementally to most
any edits within a second on a modest computer.  After 500ms of edit
inactivity, it should be trivial to calculate a damage region based on
edits since last dumb coloring update.  The inactivity threshold could
be temporarily extended to a second or two when we see that the user
just did something expensive (e.g., inserted "'(" near the start of a
very large buffer).

                                                        Neil W. Van Dyke

Posted on the users mailing list.