[plt-scheme] Student parsing problem

From: Anthony Cowley (acowley at seas.upenn.edu)
Date: Wed Jun 3 14:41:29 EDT 2009

On Wed, Jun 3, 2009 at 2:30 PM, Eli Barzilay<eli at barzilay.org> wrote:
>> I agree that it is convenient to comment out multiple sexprs, but I
>> think that, at this point, one falls back to the #| |# syntax
>
> Well, that still has the same problem of two points that needs editing
> if you want to uncomment the two expressions back in.  (BTW, just the
> word "uncomment" is a strong hint that this kind of convenience is
> needed...)

But that seems like something that can be handled at the editor level:
a keystroke that strips an enclosing #| |# pair. It's still not
perfect because you need to select a region to comment out, rather
than just visually counting the sexprs, but the "uncomment" action can
be addressed without new syntax. One could take the idea further and
have an emacs-ish chord that takes an argument to indicate how many
sexprs to comment out. Put the cursor before an sexpr, hit C-whatever,
then a number to indicate how many sexprs, and the editor can insert
the #| |# pair around the region.

Anthony


Posted on the users mailing list.