On Thu, Jan 24, 2002 at 11:20:42AM +0100, Jan Nieuwenhuizen wrote:
> Chris Jackson <[EMAIL PROTECTED]> writes:
> 
> > OK - The code below is a first attempt at indentation for lilypond-mode.
> 
> Wow.  That first attempt seems to work quite well, at first try!

Excellent. 

> > The problem with the accents / phrase marks is that the standard Emacs
> > syntax table is not able to deal with regexps as parenthesis-pairs, just
> > single characters.
> 
> Ouch.  Have you tried asking emacs gurus (eg [EMAIL PROTECTED] or
> [EMAIL PROTECTED])?

Not directly, but as far as I can tell from browsing mailinglists this
is a recognised limitation. I'll investigate and try to find some other
obscure languages that have characters meaning different things in
different contexts...

> > As a result, this code is *very slow*, especially for indenting big
> > blocks of text at once at the bottom of a source file... But it's OK for
> > indenting single lines as you type. 
> 
> I must say that the speed is not too bad.  On my fairly old G3/233MHz,
> it feels comparable with c-mode's indenting speed.

The problem comes when I have largish source files, looking like, say,

thing = \notes {
(20 lines) 
}

nextthing = \notes {
(20 lines) 
}

... (about 10 of these)

and I select the block at the bottom of the file and run indent-region,
in which case it can take over a minute (on my Athlon 1.3...), whereas 
indenting the equivalent amount of C code would be instant. Not to
mention trying to indent the whole file at once...

> > +;;; some code is taken from ESS (Emacs Speaks Statistics) S-mode by A.J.Rossini 
><[EMAIL PROTECTED]>
> 
> (that's gpl'd right?)

Yep it's GPL. 

> Oh, and could you please send a ChangeLog entry?


--- lilypond-1.5.28/ChangeLog   Thu Jan 24 10:40:55 2002
+++ lilypond-1.5.28-new/ChangeLog       Thu Jan 24 10:41:17 2002
@@ -1,3 +1,14 @@
+2002-1-24 Chris Jackson <[EMAIL PROTECTED]>
+
+       * lilypond-indent.el: New file providing indentation for
+       parenthesised blocks of lilypond code in Emacs
+       
+       * lilypond-font-lock.el: Changes to the syntax table to facilitate
+       indentation and handle block comments properly. Distinguish
+       accents from close-brackets in fontification.
+
+       * lilypond-mode.el: LilyPond-indent-command set appropriately.
+               
 2001-12-29  Han-Wen  <[EMAIL PROTECTED]>
        
        * VERSION: 1.5.28 released


thanks,
-- 
chris

_______________________________________________
Lilypond-devel mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to