[racket] programmatic file editing

From: Rodolfo Carvalho (rhcarvalho at gmail.com)
Date: Thu Jun 7 01:05:09 EDT 2012

Hello Neil V,

On Wed, Jun 6, 2012 at 7:26 PM, Neil Van Dyke <neil at neilvandyke.org> wrote:

> ...
>

>
 #:insert
>  `(
>   ;; Add a missing #lang line to the top of the file:
>   (0 "#lang setup/infotab\n")
>
> ...
> I thought I'd bounce this off anyone who was interested to see if I missed
> some useful feature that's easier to implement from the start than to
> implement after.
>
>

Sorry if I just didn't get it right, but wouldn't it be useful to have a
conditional insert?
For instance, it would make sense to insert a #lang line only when there
isn't one already.

Maybe there are other ways to accomplish it without adding more stuff to
your language that I just didn't think of for the moment.

[]'s

Rodolfo Carvalho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120607/70b2555c/attachment.html>

Posted on the users mailing list.