[plt-scheme] Inadequate indentation facility in MrEd/DrScheme
On Thu, Jun 19, 2008 at 12:31 AM, Matt Jadud <jadudm at gmail.com> wrote:
> On 6/18/08, James Russell <j.russell at alum.mit.edu> wrote:
>> On Wed, Jun 18, 2008 at 11:32 PM, Shriram Krishnamurthi <sk at cs.brown.edu> wrote:
>> > You mean as opposed to the indentation customization options?
>
>> My, admittedly cursory, inspection of framework/private/scheme.ss
>
> I'm confused. I am able to customize indentation through a variety of
> preferences, and get letrec-like (or documentation-like) indentation
> without any difficulty.
>
> You've explained very little; what kind of indentation are you trying
> to achieve, and what are you seeing?
>
I'm not talking about indentation customization in general,
which I can do using the preferences form in DrScheme.
I'm talking about a very specific set of forms that I cannot
make DrScheme indent properly.
I'm trying, for instance, to get a syntax form like
'for/fold' (but this is only an example), which
has two binding sub-forms before the body sub-forms,
to indent like it does in the manual or like it might in emacs,
where I can specify that multiple sub-forms (not just one)
should indent four rather than two spaces.
In emacs I would say:
(put 'for/fold 'scheme-indent-function 2)
If DrScheme can do this, I can't figure it out.
In the manual, for/fold looks roughly like
(for/fold (foo...)
(bar...)
body
body
...)
I'd be happy with (as emacs might indent):
(for/fold (foo...)
(bar...)
body
body
...)
or
(for/fold
(foo...)
(bar...)
body
body
...)
All I can get DrScheme to do, by making 'for/fold'
lambda like is:
(for/fold (foo...)
(bar...)
body
body
...)
or
(for/fold
(foo...)
(bar...)
body
body
...)
but '(bar...)' is a binding-form and should not be indented like a body form.
One can further imagine other macros that have 2 binding forms,
or that even have 3 or more binding sub-forms, which would suffer
from the same problem.
> Cheers,
> Matt
>