[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GOP-PROP 10: scheme indentation

From: Carl Sorensen
Subject: Re: GOP-PROP 10: scheme indentation
Date: Tue, 16 Aug 2011 09:41:11 -0600

On 8/16/11 4:31 AM, "Ian Hulin" <address@hidden> wrote:

> On 16/08/11 08:51, Trevor Daniels wrote:
>> Graham Percival wrote Tuesday, August 16, 2011 5:53 AM
>>> There seems to be general happiness with Carl's work; a few minor
>>> tweaks here and there may still be necessary, but hopefully this
>>> discussion will pretty much be rubber-stamping.
>> [snip]
>>> ** Implementation notes
>>> The C++ change went quite well, and we have far fewer outstanding
>>> patches for scheme code. No problems anticipated.
>> It would be helpful to say where the script will be placed and what
>> it will be called.

Current patch has scripts/auxiliar/

>> Trevor
> Also, what the general parameters are in terms of editor settings.
> Does it replace tabs with spaces,

It does replace tabs with spaces.

> what is the indent size,

Indent size varies depending on the keyword that you are indenting relative
to.  Most of the time it's 1; sometimes it's 2.  That appears to be a
Scheme/LISP standard.

> what does it
> assume as the tab size?

It makes no assumption as to the tab size.  Actually, it does assume 8 as
the tab size, but then it cleans things up properly anyway.

Indentation in Scheme isn't an arbitrary or free choice, except in a very
few instances.  Virtually always, indentation is defined in order to get the
appropriate behavior relative to the line above, with a perfect alignment if
you are at the same logical level, and a one- or two-space indent if you are
at a lower logical level (i.e. the first line is a function, the second is
the first argument to the function).

> I'd really like to capture this bare minimum info in the CG so that once
> the done the central conversion's been done I can avoid causing
> screw-ups in future development that need correcting with the script.

The origin of this script was as a script that could be called from within
vim to properly format a scheme file.  If your editor can execute an
arbitrary script on the file being edited, I'd recommend you just use
scripts/auxiliar/guileindent.scm as the script to be run on the file.  That
way you don't have to maintain anything.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]