[racket] bracket conversion?

From: Laurent (laurent.orseau at gmail.com)
Date: Thu Nov 22 14:29:35 EST 2012

Actually, that's what I thought at first too, but then I thought you could
1) Search for a let,
2) Select the var-expr list of the let,
3) If there is only 1 var-expr association per line, then something like
(not tested) s/^([^\(]*)\((.*)\)([^\)]*)/\1[\2]\3/ should do it, provided
you don't select the var-expr-list parentheses.
4) Rinse and repeat.

Of course that fails if you have code like (let ((a 4)(b4)) ...)


On Thu, Nov 22, 2012 at 8:10 PM, Eli Barzilay <eli at barzilay.org> wrote:

> Just now, Laurent wrote:
> >     (Oh, and I should of course say that this depends on having a
> >     very convenient way to deal with keyboard macros, something that
> >     Emacs in its default configuration doesn't have.)
> >
> > Just in case that's of any help, the script-plugin has a
> > regexp-replace-in-file script.  (
> >
> http://planet.racket-lang.org/display.ss?package=script-plugin.plt&owner=
> > orseau )
> (The specific case of converting parens is one where you don't want to
> use just a regexp replace...)
> --
>           ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
>                     http://barzilay.org/                   Maze is Life!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121122/31011adf/attachment.html>

Posted on the users mailing list.