Rodolfo Carvalho wrote at 06/07/2012 01:05 AM:
#:insert
`(
;; Add a missing #lang line to the top of the file:
(0 "#lang setup/infotab\n")
[...]
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.
That was toy example of a call to "progedit", like a test case, and not
very clear. In a real program, you'd programmatically build the list
you pass to the "#:insert" keyword argument of "progedit". So, you
would only add the (0 "#lang setup/infotab\n") to that list if you found
through other means that you needed to add a #lang line. "progedit"
itself only performs the inserts, deletes, and replaces.
Neil V.
____________________
Racket Users list:
http://lists.racket-lang.org/users