lilypond-devel
[Top][All Lists]
Advanced

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

Re: GOP2-4 - C++ and scheme indentation


From: David Kastrup
Subject: Re: GOP2-4 - C++ and scheme indentation
Date: Thu, 09 Aug 2012 13:41:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Graham Percival <address@hidden> writes:

> On Thu, Aug 09, 2012 at 01:08:42PM +0200, David Kastrup wrote:
>> Graham Percival <address@hidden> writes:
>> 
>> > Do you want to tell me (and them) that we shouldn't be editing
>> > .scm files in lilypond?
>> 
>> This is not satisfactorily solved by first writing everything and
>> running an indenter afterwards.  You'll mess up the nesting levels and
>> your program will not work.
>
> Yeah, but I find it way easier to write scheme code with matching
> parentheses.  I wrote ly/event-listener.ly like this:
>
> #(define (format-note engraver event)
>    (let* ((origin (ly:input-file-line-char-column
>                    (ly:event-property event 'origin)
>                   )
>          ))

It is "way easier" because you are not using a Scheme-aware editor.  And
probably not the most Scheme-aware author...  Shrug.

It is not even unlikely that vim might have something to offer in that
area.  I am not really interested all that much in automatic
indentation, or fixed rules.  People should write Scheme recognizable as
Scheme, C++ recognizable as C++, LilyPond recognizable as LilyPond.
There are reasonably established conventions for that.  Usually applying
them with a grain of salt leads to better readability rather than
enforcing some indentation scheme rigidly.

-- 
David Kastrup



reply via email to

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