lilypond-devel
[Top][All Lists]
Advanced

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

Indentation in Emacs


From: Chris Jackson
Subject: Indentation in Emacs
Date: Mon, 7 Jan 2002 23:13:51 +0000
User-agent: Mutt/1.3.24i

I'm trying to adapt some emacs lisp to do indentation for lilypond
source code (based on the ESS emacs modes for statistical programming
languages...). What do people think is a reasonable indenting style?
Obviously there's sequential {} and simultaneous <> blocks of music
which might be indented in a standard way like so..

\score
  {
    <
      \context PianoStaff \notes <
        \context Staff=top < 
          \treblebits
          \trebleall
          >
        \context Staff=bottom < 
                                \bassbits
                                \bassall
                                >
        >
      >
  }

But what about other sorts of brackets? I suppose it wouldn't be too bad
to have () matching for inline Scheme code like

#(define dotted-crotchet 
  `(columns ,crotchet (
    (kern . 0.5) 
    (music (
      "dots-dot")))))

even though, a ( b c d ) e f g already indicates a phrasemark in plain
lily.  Then there's beaming marks [] as well, these might be treated 
as braces as well. It'd also be useful to have statements like

\bitofmusic = 
  \notes 
  \relative c''
  {

treated in a sensible way when split over multiple lines.

Any other ideas? I suppose many people have developed their own lilypond
formatting styles anyway in the absence of auto-indent.

-- 
chris



reply via email to

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