[plt-scheme] Odd Auto-indenting
On Jun 14, Chris Warrington wrote:
>
> What's up with weird auto-formatting in this snippet of code:
> (call-with-output-file
> argument
> (lambda (port) (dump-database (call-with-input-file
> DATABASE
> read-cookie-objects)
> FORMAT
> LINE_LENGTH
> port))
> 'text
> 'truncate/replace)
>
> Notice especially the (call-with-input-file DATABASE read-cookie-objects)
> sexp. Now that's just weird.
This is a very common indentation pattern -- call-with-input/output-file
have a "special" first argument, and then a body-like thunk. Emacs
does the same too (and probably what inspired the indentation code in
DrScheme).
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!