Generated by hanwen@cs.uu.nl,
From = lilypond-1.7.8, To = lilypond-1.7.9

usage 

    cd lilypond-source-dir; patch -E -p1 < lilypond-1.7.8-1.7.9.diff

Patches do not contain automatically generated files 
or (urg) empty directories, 
i.e., you should run

	./autogen.sh
	./configure [your options.]

	
diff -purN ../lilypond-1.7.8/buildscripts/make-font-dir.py ./buildscripts/make-font-dir.py
--- ../lilypond-1.7.8/buildscripts/make-font-dir.py	2002-10-21 00:44:13.000000000 +0200
+++ ./buildscripts/make-font-dir.py	2002-11-29 19:58:41.000000000 +0100
@@ -83,7 +83,11 @@ class Font_info:
 		if len (split) >= 4:
 			# Assume
 			#   Adobe FontName = X11 foundry-family-weight-style
-			self.foundry, self.family = split[:2]
+			if 1:
+				self.foundry, self.family = split[:2]
+			else: # testin'
+				self.foundry = split[0]
+				self.family = string.join (split[1:-2], ' ')
 			self.weight = string.join (split[2:-1], ' ')
 			self.style = split[-1:][0]
 			self.FamilyName = '%s %s' % (self.family, self.weight)
@@ -129,11 +133,15 @@ ls =  sys.stdin.readline ()
 ls = string.split (ls)
 
 sketch_p = 0
-if len (ls) and ls[0] == 'sketch':
+sodipodi_p = 0
+if len (ls) and ls[0] == 'sodipodi':
+	ls = ls[1:]
+	sodipodi_p = 1
+elif len (ls) and ls[0] == 'sketch':
 	ls = ls[1:]
 	sketch_p = 1
 
-if not sketch_p:
+if not (sketch_p or sodipodi_p):
 	print len(ls)
 	
 for filename in ls:
@@ -218,10 +226,16 @@ for filename in ls:
 		
 	family_name = string.join (string.split (fontinfo['FamilyName'],
 							'-'), ' ')
-	if not sketch_p:
-		print filename + ' -' + string.join (fontinfo.get_X11 (), '-')
-		
-	else:
+
+	if sodipodi_p:
+		print string.join ((os.path.abspath (filename),
+				    fontinfo.FamilyName,
+				    fontinfo.FamilyName,''
+				    ),
+				   
+				   ',')
+				   
+	elif sketch_p:
 		# Sketch's lilypond.sfd map:
 		s = string.join ([fontinfo.FontName,
 				  fontinfo.family,
@@ -240,3 +254,5 @@ for filename in ls:
 				  fontinfo.name],
 				 ',')
 		print s
+	else:
+		print filename + ' -' + string.join (fontinfo.get_X11 (), '-')
diff -purN ../lilypond-1.7.8/buildscripts/mf-to-table.py ./buildscripts/mf-to-table.py
--- ../lilypond-1.7.8/buildscripts/mf-to-table.py	2002-10-28 01:26:22.000000000 +0100
+++ ./buildscripts/mf-to-table.py	2002-11-29 19:58:41.000000000 +0100
@@ -86,12 +86,18 @@ def parse_logfile (fn):
 			font_family = (tags[3])
 			# To omit 'GNU' (foundry) from font name proper:
 			# name = tags[2:]
+			#urg
+			if 0: #testing
+				tags.append ('Regular')
 			name = tags[1:]
 			global_info['FontName'] = string.join (name,'-')
 			global_info['FullName'] = string.join (name,' ')
 			global_info['FamilyName'] = string.join (name[1:-1],
 								 '-')
-			global_info['Weight'] = tags[4]
+			if 1:
+				global_info['Weight'] = tags[4]
+			else: #testing
+				global_info['Weight'] = tags[-1]
 			global_info['FontBBox'] = '0 0 1000 1000'
 			global_info['Ascender'] = '0'
 			global_info['Descender'] = '0'
diff -purN ../lilypond-1.7.8/ChangeLog ./ChangeLog
--- ../lilypond-1.7.8/ChangeLog	2002-11-19 13:10:24.000000000 +0100
+++ ./ChangeLog	2002-12-01 20:40:19.000000000 +0100
@@ -1,3 +1,223 @@
+2002-12-01  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+	* VERSION: 1.7.9 released
+
+	* scm/music-functions.scm (shift-one-duration-log): refactor.
+	Use music-map.
+
+	* input/regression/chord-tremolo.ly (texidoc): add dot test.
+
+	* NEWS: update.
+
+	* lily/font-interface.cc (get-font): take alist chain i.s.o. alist
+	argument
+	
+	* scm/music-functions.scm (display-music): new function
+	(music-map): change arg order.
+
+	* input/regression/new-markup-syntax.scm: new file
+
+	* lily/parser.yy (markup): add \markup { .. } syntax.
+
+	* scm/new-markup.scm (override-markup): new function
+	(lookup-markup): new function
+	(music-markup): new function
+	(lookup-markup-command): use markup-signature to store argument
+	format for parser.
+
+	* lily/lexer.ll: preliminary \markup syntax. 
+
+2002-11-30  Heikki Junes <hjunes@cc.hut.fi>
+
+	* make/lilypond.mandrake.spec.in: remove extra %changelog entries,
+	add pre/post-dependencies and menus with icons from source.
+
+	* Documentation/pictures/lilypond-48x48.xpm:
+	* Documentation/pictures/lilypond-32x32.xpm:
+	* Documentation/pictures/lilypond-16x16.xpm: new files, background
+	transparent.
+
+	* stepmake/stepmake/generic-targets.make:
+	* stepmake/stepmake/toplevel-targets.make: Add make rpm-mandrake.
+
+2002-11-29  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+	* input/regression/music-map.ly (texidoc): new file.
+
+	* scm/music-functions.scm (music-map): new function
+
+2002-11-28  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+	* lily/ligature-engraver.cc (create_ligature_spanner): fix fixes.
+
+2002-11-28  Heikki Junes <hjunes@cc.hut.fi>
+
+	* input/test/to-xml.ly:
+	* lily/ligature-engraver.cc: Fixes documentation.
+
+	* lilypond.mandrake.spec.in:
+	* lilypond.redhat.spec.in: Add lilypond.words.
+
+	* Documentation/user/refman.itely: Mention Info inside emacs.
+	
+	* lilypond.suse.spec.in:
+	* lilypond.redhat.spec.in: 
+	* lilypond.mandrake.spec.in: Set root-owner for doc (tobbe@nyvalls.se). 
+
+2002-11-27  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+	* scripts/ly2dvi.py (run_dvips): Use ly.read_pipe () instead of
+	os.popen.read ().
+
+2002-11-27  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+	* scripts/ly2dvi.py (include_path): print warning if failing anything.
+
+	* python/lilylib.py (error): add space
+
+2002-11-25  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+	* GNUmakefile.in (EXTRA_DIST_FILES): add lilypond.words for
+	distribution.
+
+2002-11-24  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+	* lily/paper-outputter.cc (Paper_outputter): close port when
+	finishing score.
+
+2002-11-26  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+	* scm/sodipodi.scm: Fixes.
+
+2002-11-26  Heikki Junes <hjunes@cc.hut.fi>
+
+	* lilypond-mode.el: Look shortcuts in menu from keymap, if possible.
+
+	* buildscripts/make-font-dir.py: Fix. 
+
+2002-11-25  Heikki Junes <hjunes@cc.hut.fi>
+
+	* lilypond-mode.el: Add support for Info inside Emacs.
+
+2002-11-24  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+	* buildscripts/make-font-dir.py: 
+	* mf/GNUmakefile: Make sodipodi font map.
+
+	* scm/sodipodi.scm: Add more output functions.
+
+	* mf/feta-nummer.mf: 
+	* mf/feta-beugel.mf: Add font_coding_scheme.
+
+	* lily/paper-outputter.cc (output_header): Fix creator string.
+
+2002-11-23  Heikki Junes <hjunes@cc.hut.fi>
+
+	* lilypond-mode.el (LilyPond-autocompletion): invoked with
+	[S-iso-lefttab], fixes at bol and eol, descriptive variable names.
+
+	* lilypond.words: add two (Everybody can add/remove words now!).
+
+	* debian/rules:
+	* make/lilypond.suse.spec.in:
+	* make/lilypond.mandrake.spec.in:
+	* make/lilypond.redhat.spec.in: Add lilypond.words for emacs-files.
+
+	* Documentation/user/refman.itely: Mention autocompletion.
+
+2002-11-23  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+	* scripts/ly2dvi.py: Add paper sizes.
+
+	* lily/timing-engraver.cc: 
+	* lily/time-signature.cc: 
+	* lily/span-bar.cc: 
+	* lily/grob-scheme.cc: Code formatting fixes.
+
+	* scm/sodipodi.scm: 
+	* scm/sketch.scm:
+	* buildscripts/mf-to-table.py: 
+	* buildscripts/make-font-dir.py: Font testing.
+
+2002-11-23  Heikki Junes <hjunes@cc.hut.fi>
+
+	* lilypond-mode.el (LilyPond-autocompletion): deletes end-of-word,
+	inserts try-completion and shows all-completions.
+
+	* lilypond.words: '\' -> '\\'
+
+	* lilypond-mode.el: load libraries in the end, lilypond.words defines
+	LilyPond-keywords, LilyPond-identifiers and LilyPond-reserved-words.
+	
+	* lilypond-font-lock.el: Use LilyPond-keywords, LilyPond-identifiers
+	and LilyPond-reserved-words.
+	
+2002-11-22  Heikki Junes <hjunes@cc.hut.fi>
+
+	* lilypond-mode.el (LilyPond-words-filename): find lilypond.words
+	from load-path.
+	
+	* lilypond-mode.el (LilyPond-autocompletion): shows completions in
+	the mini-buffer with Control-Shift-c.
+	
+2002-11-21  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+	* lily/parser.yy (tempo_event): use tempo-unit for \tempo
+	duration. This fixes \tempo taking time.
+
+2002-11-21  Mats Bengtsson  <mats.bengtsson@s3.kth.se>
+
+	* lily/volta-engraver.cc (process_acknowledged_grobs): 
+	Allow for text markup in repeatCommands. 
+
+2002-11-21  Heikki Junes <hjunes@cc.hut.fi>
+
+	* lilypond-mode.el (LilyPond-insert-string): new function, use it
+	in LilyPond-insert-tag-notes. LilyPond-insert-between, new function.
+	Get rid of skeleton.el-dependency.
+
+	* Documentation/topdocs/INSTALL.texi: tell how to get syntax-highlight.
+
+2002-11-20  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+	* lily/beam-engraver.cc (stop_translation_timestep): reset
+	now_stop_ev_
+
+	* lily/scm-option.cc: add parse-protect to ly:set-option
+
+	* lily/lexer.ll: set errorlevel if GUILE fails during parse.
+
+2002-11-19  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+	* lily/include/ligature-bracket.hh: removed
+	* lily/ligature-bracket.cc: removed
+
+	* lilypond-mode.el (LilyPond-expand-alist): set LaTeX extension to
+	.tex
+
+	* lily/beam.cc (set_beaming): don't change beam count on rests.
+	(brew_molecule): always set flag-width > 0.
+
+2002-11-19  Heikki Junes <hjunes@cc.hut.fi>
+
+	* lilypond-mode.el: LilyPond-imenu-generic-re: only alphabetic
+	chars, remove instructions; instead, refer to lilypond-init.el and
+	Documentation/topdocs/INSTALL.texi.
+
+	* lilypond.words: add identifiers and reserved words.
+
+	* Documentation/topdocs/INSTALL.texi: separate sections for installing
+	files and adding a load-path.
+
+	* lilypond-init.el: Instructions, extracted from 
+	Documentation/topdocs/INSTALL.texi. 
+	
+2002-11-19  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+	* VERSION: 1.7.8 released 
+
+	* lily/grob.cc (warning): better robustness fix.
+
 2002-11-19 Juergen Reuter  <reuter@ipd.uka.de>
 
 	* lily/cluster-engraver.cc: bugfix: use protected scm upon columns
@@ -54,7 +274,7 @@
 
 	* Documentation/user/music-glossary.tely (Top): add custos.
 
-2002-11-16  Heikki Junes <hjunes@cc.hut.fi>
+2002-11-18  Heikki Junes <hjunes@cc.hut.fi>
 
 	* Documentation/topdocs/INSTALL.texi: advise how to include source
 	path to Emacs load-path and improve language.
@@ -86,6 +306,8 @@
 	
 	* input/*.ly: update syntax to 1.7 + new-chords.
 
+	* VERSION: 1.7.7 released.
+	
 	* Documentation/user/*.tely: new chord syntax.
 
 	* input/regression/[bc]*.ly (texidoc): syntax updates.
diff -purN ../lilypond-1.7.8/debian/rules ./debian/rules
--- ../lilypond-1.7.8/debian/rules	2002-09-24 15:54:27.000000000 +0200
+++ ./debian/rules	2002-11-29 19:58:42.000000000 +0100
@@ -129,7 +129,7 @@ binary-arch: build install
 	dh_testdir
 	dh_testroot
 	cp -av lilypond-mode.el lilypond-font-lock.el lilypond-indent.el \
-		$(r)/usr/share/emacs/site-lisp/
+		lilypond.words $(r)/usr/share/emacs/site-lisp/
 	dh_installdocs DEDICATION NEWS ROADMAP *.txt
 
 #	dh_installdocs DEDICATION NEWS ROADMAP *.txt \
diff -purN ../lilypond-1.7.8/Documentation/pictures/lilypond-16x16.xpm ./Documentation/pictures/lilypond-16x16.xpm
--- ../lilypond-1.7.8/Documentation/pictures/lilypond-16x16.xpm	1970-01-01 01:00:00.000000000 +0100
+++ ./Documentation/pictures/lilypond-16x16.xpm	2002-12-01 00:37:33.000000000 +0100
@@ -0,0 +1,96 @@
+/* XPM */
+static char * lilypond_16x16_xpm[] = {
+"16 16 77 1",
+" 	c None",
+".	c #000000",
+"+	c #F0F0F0",
+"@	c #A4A4A4",
+"#	c #B7B7B7",
+"$	c #9C9C9C",
+"%	c #565656",
+"&	c #717171",
+"*	c #858585",
+"=	c #252525",
+"-	c #DCDCDC",
+";	c #4F4F4F",
+">	c #2F2F2F",
+",	c #BFBFBF",
+"'	c #383838",
+")	c #4A4A4A",
+"!	c #B8B8B8",
+"~	c #DADADA",
+"{	c #EDEDED",
+"]	c #333333",
+"^	c #585858",
+"/	c #1F1F1F",
+"(	c #070707",
+"_	c #C8C8C8",
+":	c #9A9A9A",
+"<	c #5F5F5F",
+"[	c #EEEEEE",
+"}	c #737373",
+"|	c #080808",
+"1	c #575757",
+"2	c #727272",
+"3	c #8F8F8F",
+"4	c #515151",
+"5	c #141414",
+"6	c #7D7D7D",
+"7	c #939393",
+"8	c #9E9E9E",
+"9	c #020202",
+"0	c #303030",
+"a	c #A5A5A5",
+"b	c #848484",
+"c	c #4D4D4D",
+"d	c #626262",
+"e	c #BEBEBE",
+"f	c #868686",
+"g	c #5B5B5B",
+"h	c #2C2C2C",
+"i	c #8B8B8B",
+"j	c #969696",
+"k	c #A3A3A3",
+"l	c #0C0C0C",
+"m	c #2B2B2B",
+"n	c #525252",
+"o	c #C6C6C6",
+"p	c #828282",
+"q	c #6C6C6C",
+"r	c #AAAAAA",
+"s	c #272727",
+"t	c #343434",
+"u	c #292929",
+"v	c #090909",
+"w	c #494949",
+"x	c #A8A8A8",
+"y	c #3C3C3C",
+"z	c #010101",
+"A	c #3A3A3A",
+"B	c #818181",
+"C	c #101010",
+"D	c #696969",
+"E	c #747474",
+"F	c #D1D1D1",
+"G	c #C3C3C3",
+"H	c #6E6E6E",
+"I	c #555555",
+"J	c #6F6F6F",
+"K	c #A6A6A6",
+"L	c #EFEFEF",
+"       +@#+++   ",
+"       $%&*=-   ",
+"      +;>,')+   ",
+"    !~{]^/(_    ",
+"    :<[}| 12+   ",
+"    +3455 67+   ",
+"     8920 ab+   ",
+"     3|c def+   ",
+"     +g&hij2    ",
+"     +@klmno    ",
+"    +pgq ;~     ",
+"   +rst0uvw<@+  ",
+"  x'   9y5  zA  ",
+"  BC 99DEzv >i  ",
+"  +F6EGHIgJKL   ",
+"                "};
diff -purN ../lilypond-1.7.8/Documentation/pictures/lilypond-32x32.xpm ./Documentation/pictures/lilypond-32x32.xpm
--- ../lilypond-1.7.8/Documentation/pictures/lilypond-32x32.xpm	1970-01-01 01:00:00.000000000 +0100
+++ ./Documentation/pictures/lilypond-32x32.xpm	2002-12-01 00:37:33.000000000 +0100
@@ -0,0 +1,193 @@
+/* XPM */
+static char * lilypond_32x32_xpm[] = {
+"32 32 158 2",
+"  	c None",
+". 	c #000000",
+"+ 	c #F0F0F0",
+"@ 	c #B5B5B5",
+"# 	c #949494",
+"$ 	c #999999",
+"% 	c #E5E5E5",
+"& 	c #D6D6D6",
+"* 	c #1B1B1B",
+"= 	c #727272",
+"- 	c #4E4E4E",
+"; 	c #1E1E1E",
+"> 	c #A8A8A8",
+", 	c #D4D4D4",
+"' 	c #414141",
+") 	c #535353",
+"! 	c #EDEDED",
+"~ 	c #575757",
+"{ 	c #0E0E0E",
+"] 	c #CECECE",
+"^ 	c #C9C9C9",
+"/ 	c #232323",
+"( 	c #8A8A8A",
+"_ 	c #D0D0D0",
+": 	c #B6B6B6",
+"< 	c #0D0D0D",
+"[ 	c #111111",
+"} 	c #262626",
+"| 	c #DDDDDD",
+"1 	c #6D6D6D",
+"2 	c #020202",
+"3 	c #4D4D4D",
+"4 	c #353535",
+"5 	c #505050",
+"6 	c #272727",
+"7 	c #5E5E5E",
+"8 	c #8B8B8B",
+"9 	c #717171",
+"0 	c #313131",
+"a 	c #C0C0C0",
+"b 	c #323232",
+"c 	c #2B2B2B",
+"d 	c #4C4C4C",
+"e 	c #595959",
+"f 	c #2D2D2D",
+"g 	c #0B0B0B",
+"h 	c #050505",
+"i 	c #A3A3A3",
+"j 	c #D9D9D9",
+"k 	c #EBEBEB",
+"l 	c #161616",
+"m 	c #5B5B5B",
+"n 	c #898989",
+"o 	c #A7A7A7",
+"p 	c #EFEFEF",
+"q 	c #444444",
+"r 	c #E2E2E2",
+"s 	c #EEEEEE",
+"t 	c #656565",
+"u 	c #202020",
+"v 	c #010101",
+"w 	c #060606",
+"x 	c #A9A9A9",
+"y 	c #DEDEDE",
+"z 	c #ECECEC",
+"A 	c #4A4A4A",
+"B 	c #7D7D7D",
+"C 	c #101010",
+"D 	c #9C9C9C",
+"E 	c #555555",
+"F 	c #7B7B7B",
+"G 	c #BBBBBB",
+"H 	c #2F2F2F",
+"I 	c #606060",
+"J 	c #989898",
+"K 	c #CACACA",
+"L 	c #141414",
+"M 	c #222222",
+"N 	c #D5D5D5",
+"O 	c #070707",
+"P 	c #E7E7E7",
+"Q 	c #A1A1A1",
+"R 	c #9A9A9A",
+"S 	c #636363",
+"T 	c #9E9E9E",
+"U 	c #181818",
+"V 	c #D2D2D2",
+"W 	c #212121",
+"X 	c #8C8C8C",
+"Y 	c #848484",
+"Z 	c #484848",
+"` 	c #6A6A6A",
+" .	c #D1D1D1",
+"..	c #919191",
+"+.	c #7C7C7C",
+"@.	c #BABABA",
+"#.	c #1F1F1F",
+"$.	c #7F7F7F",
+"%.	c #474747",
+"&.	c #4F4F4F",
+"*.	c #C7C7C7",
+"=.	c #878787",
+"-.	c #868686",
+";.	c #2E2E2E",
+">.	c #191919",
+",.	c #E1E1E1",
+"'.	c #282828",
+").	c #B3B3B3",
+"!.	c #3D3D3D",
+"~.	c #B8B8B8",
+"{.	c #464646",
+"].	c #0A0A0A",
+"^.	c #9D9D9D",
+"/.	c #383838",
+"(.	c #080808",
+"_.	c #777777",
+":.	c #292929",
+"<.	c #6E6E6E",
+"[.	c #2A2A2A",
+"}.	c #B7B7B7",
+"|.	c #A5A5A5",
+"1.	c #8D8D8D",
+"2.	c #858585",
+"3.	c #5F5F5F",
+"4.	c #8F8F8F",
+"5.	c #242424",
+"6.	c #CDCDCD",
+"7.	c #7A7A7A",
+"8.	c #C2C2C2",
+"9.	c #838383",
+"0.	c #B0B0B0",
+"a.	c #929292",
+"b.	c #A0A0A0",
+"c.	c #C4C4C4",
+"d.	c #1A1A1A",
+"e.	c #747474",
+"f.	c #131313",
+"g.	c #CFCFCF",
+"h.	c #3C3C3C",
+"i.	c #686868",
+"j.	c #DBDBDB",
+"k.	c #040404",
+"l.	c #343434",
+"m.	c #090909",
+"n.	c #6C6C6C",
+"o.	c #545454",
+"p.	c #030303",
+"q.	c #C3C3C3",
+"r.	c #565656",
+"s.	c #2C2C2C",
+"t.	c #969696",
+"u.	c #C1C1C1",
+"v.	c #525252",
+"w.	c #666666",
+"x.	c #5D5D5D",
+"y.	c #121212",
+"z.	c #303030",
+"A.	c #E4E4E4",
+"                                  + +                           ",
+"                              + @ # $ % +   + + +               ",
+"                            + & * = - ; > , ' ) !               ",
+"                            + ~ { ] + ^ / ( . . _               ",
+"                          + : < [ } | + 1 2 . 3 +               ",
+"                          + 4 5 6 7 8 + 9 . 0 a +               ",
+"                          + b c d e f - g h % +                 ",
+"                + i j +   k l m n 0 . . . g o +                 ",
+"                p q 0 r + s t u ; v . . w x 0 y +               ",
+"                + z A ) s + p B . v . . C D ( E +               ",
+"                  + y c F G H . . . . . I b J ! +               ",
+"                    + K L w . M 5 . . . o N u y                 ",
+"                    + K O . [ P Q . . . R + S +                 ",
+"                    + 1 . . U V W . . v T + X Y +               ",
+"                    + Z . . 7 [ . . O `  .  ..+.+               ",
+"                    + @.  #.$.%.. . &.*.> + =.-.+               ",
+"                      + ;.' >.,.'.. ).X %.+ !.+                 ",
+"                      + {.: ]., =.. ^.) -.: /.+                 ",
+"                      + 5 % $.+ H . (._.:.* @.+                 ",
+"                      + + B <.G . . 2 [.e }.+                   ",
+"                  + + |.1.!.2.3.. . 4.5.6 +                     ",
+"                  + % W [.7.8.g . v 3.[.+                       ",
+"                  + 9.. . 0.a.. . 0 (.g 1.b  .+ +               ",
+"            + + c.X d.. . u ;.. . e.f.. . . v f +.g.+           ",
+"          + o h.v . . . . . . . . : %.. . . . . . h i.j.        ",
+"        + 1.k.k.. . . . . . . O f.6 ].. . . . . . . . u.        ",
+"        + l.. . . . . m.. . L K + n.h . O . . . . . o.%         ",
+"        + ^ ' . . . . . k.p.< q.r.c . v g C . . s.t.p +         ",
+"          + + u.2.v.{.w.8.q.x.#.v . p.y.z.3.4.a p +             ",
+"                + + + + + + + + A.g.,.+ + + +                   ",
+"                                                                ",
+"                                                                "};
diff -purN ../lilypond-1.7.8/Documentation/pictures/lilypond-48x48.xpm ./Documentation/pictures/lilypond-48x48.xpm
--- ../lilypond-1.7.8/Documentation/pictures/lilypond-48x48.xpm	1970-01-01 01:00:00.000000000 +0100
+++ ./Documentation/pictures/lilypond-48x48.xpm	2002-12-01 00:37:33.000000000 +0100
@@ -0,0 +1,253 @@
+/* XPM */
+static char * lilypond_48x48_xpm[] = {
+"48 48 202 2",
+"  	c None",
+". 	c #000000",
+"+ 	c #F0F0F0",
+"@ 	c #BCBCBC",
+"# 	c #737373",
+"$ 	c #6B6B6B",
+"% 	c #707070",
+"& 	c #A5A5A5",
+"* 	c #EFEFEF",
+"= 	c #1B1B1B",
+"- 	c #222222",
+"; 	c #333333",
+"> 	c #111111",
+", 	c #313131",
+"' 	c #C1C1C1",
+") 	c #E9E9E9",
+"! 	c #747474",
+"~ 	c #3C3C3C",
+"{ 	c #9B9B9B",
+"] 	c #6E6E6E",
+"^ 	c #ABABAB",
+"/ 	c #ECECEC",
+"( 	c #B4B4B4",
+"_ 	c #383838",
+": 	c #131313",
+"< 	c #DBDBDB",
+"[ 	c #8A8A8A",
+"} 	c #040404",
+"| 	c #DCDCDC",
+"1 	c #030303",
+"2 	c #020202",
+"3 	c #424242",
+"4 	c #E8E8E8",
+"5 	c #E7E7E7",
+"6 	c #1E1E1E",
+"7 	c #6D6D6D",
+"8 	c #5B5B5B",
+"9 	c #D1D1D1",
+"0 	c #787878",
+"a 	c #0A0A0A",
+"b 	c #434343",
+"c 	c #8E8E8E",
+"d 	c #050505",
+"e 	c #3F3F3F",
+"f 	c #878787",
+"g 	c #010101",
+"h 	c #3E3E3E",
+"i 	c #A0A0A0",
+"j 	c #080808",
+"k 	c #E3E3E3",
+"l 	c #4F4F4F",
+"m 	c #292929",
+"n 	c #494949",
+"o 	c #8D8D8D",
+"p 	c #484848",
+"q 	c #7D7D7D",
+"r 	c #525252",
+"s 	c #606060",
+"t 	c #101010",
+"u 	c #8C8C8C",
+"v 	c #777777",
+"w 	c #181818",
+"x 	c #EDEDED",
+"y 	c #0F0F0F",
+"z 	c #DFDFDF",
+"A 	c #0B0B0B",
+"B 	c #C4C4C4",
+"C 	c #C9C9C9",
+"D 	c #CFCFCF",
+"E 	c #545454",
+"F 	c #838383",
+"G 	c #A1A1A1",
+"H 	c #6F6F6F",
+"I 	c #070707",
+"J 	c #121212",
+"K 	c #939393",
+"L 	c #141414",
+"M 	c #D2D2D2",
+"N 	c #EEEEEE",
+"O 	c #3D3D3D",
+"P 	c #171717",
+"Q 	c #828282",
+"R 	c #0D0D0D",
+"S 	c #D3D3D3",
+"T 	c #B6B6B6",
+"U 	c #090909",
+"V 	c #2C2C2C",
+"W 	c #C6C6C6",
+"X 	c #464646",
+"Y 	c #A9A9A9",
+"Z 	c #303030",
+"` 	c #212121",
+" .	c #9D9D9D",
+"..	c #4C4C4C",
+"+.	c #4B4B4B",
+"@.	c #151515",
+"#.	c #989898",
+"$.	c #DEDEDE",
+"%.	c #636363",
+"&.	c #767676",
+"*.	c #E1E1E1",
+"=.	c #646464",
+"-.	c #282828",
+";.	c #5D5D5D",
+">.	c #979797",
+",.	c #4E4E4E",
+"'.	c #6C6C6C",
+").	c #0C0C0C",
+"!.	c #D5D5D5",
+"~.	c #E5E5E5",
+"{.	c #2B2B2B",
+"].	c #191919",
+"^.	c #7E7E7E",
+"/.	c #363636",
+"(.	c #8F8F8F",
+"_.	c #1F1F1F",
+":.	c #656565",
+"<.	c #727272",
+"[.	c #252525",
+"}.	c #848484",
+"|.	c #C0C0C0",
+"1.	c #909090",
+"2.	c #BEBEBE",
+"3.	c #161616",
+"4.	c #4D4D4D",
+"5.	c #5A5A5A",
+"6.	c #262626",
+"7.	c #BDBDBD",
+"8.	c #4A4A4A",
+"9.	c #AAAAAA",
+"0.	c #B8B8B8",
+"a.	c #C7C7C7",
+"b.	c #B2B2B2",
+"c.	c #EBEBEB",
+"d.	c #959595",
+"e.	c #555555",
+"f.	c #C2C2C2",
+"g.	c #343434",
+"h.	c #AEAEAE",
+"i.	c #696969",
+"j.	c #DDDDDD",
+"k.	c #717171",
+"l.	c #1A1A1A",
+"m.	c #454545",
+"n.	c #666666",
+"o.	c #7A7A7A",
+"p.	c #0E0E0E",
+"q.	c #DADADA",
+"r.	c #242424",
+"s.	c #595959",
+"t.	c #5F5F5F",
+"u.	c #404040",
+"v.	c #393939",
+"w.	c #444444",
+"x.	c #8B8B8B",
+"y.	c #C8C8C8",
+"z.	c #626262",
+"A.	c #E2E2E2",
+"B.	c #B0B0B0",
+"C.	c #1D1D1D",
+"D.	c #ADADAD",
+"E.	c #2E2E2E",
+"F.	c #565656",
+"G.	c #B7B7B7",
+"H.	c #202020",
+"I.	c #EAEAEA",
+"J.	c #888888",
+"K.	c #999999",
+"L.	c #5C5C5C",
+"M.	c #CECECE",
+"N.	c #797979",
+"O.	c #D6D6D6",
+"P.	c #A2A2A2",
+"Q.	c #858585",
+"R.	c #D4D4D4",
+"S.	c #585858",
+"T.	c #272727",
+"U.	c #2A2A2A",
+"V.	c #E0E0E0",
+"W.	c #414141",
+"X.	c #868686",
+"Y.	c #757575",
+"Z.	c #E4E4E4",
+"`.	c #3B3B3B",
+" +	c #232323",
+".+	c #686868",
+"++	c #2F2F2F",
+"@+	c #A3A3A3",
+"#+	c #E6E6E6",
+"$+	c #060606",
+"%+	c #949494",
+"&+	c #1C1C1C",
+"*+	c #818181",
+"=+	c #A7A7A7",
+"-+	c #616161",
+";+	c #323232",
+">+	c #9F9F9F",
+",+	c #535353",
+"'+	c #929292",
+")+	c #5E5E5E",
+"!+	c #575757",
+"~+	c #B3B3B3",
+"                                                                                                ",
+"                                                + + + + + +                                     ",
+"                                              + @ # $ % & + +   + + + + +                       ",
+"                                            + * = - ; > . , ' + ) ! ~ { +                       ",
+"                                            + ] . ^ + / ( _ : < [ . . } < +                     ",
+"                                          + | 1 2 3 4 + + 5 6 7 8 . . . 9 +                     ",
+"                                        + + 0 . . a b * + + c d . . . e +                       ",
+"                                        + f g h 2 0 g i + + < . . . j k +                       ",
+"                                        + l . ! 1 ( m n + + o . . p q +                         ",
+"                                        + r . s t 4 : > u v w . a x + +                         ",
+"                          + + +         + e . g y z A . . . . . . B +                           ",
+"                        + C 0 D +       ) d E F G H 1 . . . . I J 0 +                           ",
+"                        + K . L M +     N O . P e } . . . . . l Q R S +                         ",
+"                        + + T U V k +   + * W X . . d . . . . Y ) Z ` D +                       ",
+"                            +  .g ..N + + + S +.. . . . . . . @.#.$., %.+                       ",
+"                            + + &.. ! + *.=.d . . . . . . . -.;.. >.N x +                       ",
+"                              + N ,.g v 6 . . . . . . . . . '.+ ] ).!.+                         ",
+"                                + ~.{.. . . ].; ^./.. . . . (.+ ) _.:.+                         ",
+"                                + | > . . . <.+ / [.. . . . 7 + + }.L N                         ",
+"                                + &.. . . . |.+ c . . . . . 1.+ + 2.. !.+                       ",
+"                                * 3.. . . . 4.*.: . . . 2 g ] + + < . ' +                       ",
+"                              + D . . . . 5.. 6.. . . . 3 d 7.+   z . 7.+                       ",
+"                              + * 8.. . = ~.... . . . . 9.k + +   z . 0.+                       ",
+"                                + a.g . {.-.b.V . . . = c.d.e.+ + f.. D +                       ",
+"                                  + g.. E . h.9 @.. . ^.+ i.g j.+ k.l.*                         ",
+"                                  + ] 1 i . i.+ T g . S + [.L / 5 = 0 +                         ",
+"                                  + =.m.+ 3.e.+ 7.. . p / . n.+ o.p.q.+                         ",
+"                                  + r.o.+ s.T + t.. . . '.u.v.w.I x.+                           ",
+"                                  + y.4 9.z.+ A.A . . . 2 B.j C.n N +                           ",
+"                                + + + x -.V + c . . . } } l.u.x + +                             ",
+"                                + D.q T . ~ + E.. . . F.( . G.+                                 ",
+"                              + 5 H.).I.w J.@ . . . . { 3 6 * +                                 ",
+"                              + ^.. . K.L.M.t.. . . 1 N.. p +                                   ",
+"                            + O.R . . /.+ ~.).. . . v.p.. ].9 *.+ + + +                         ",
+"                        + + + % . . . . P.#.. . . . k.} . . . . 3.+.Q.D + + +                   ",
+"                  + + + R.c S.t . . . . ).T.. . . . a.U.. . . . . . . g E.f D +                 ",
+"                + N & W.2 . . . . . . . . . . . . 6 + X.. . . . . . . . . A Y.D +               ",
+"              + | `.. . . . . . . . . . . . . . .  +.+w . . . . . . . . . . &+G.+               ",
+"              ) ++. p.. . . . . . . . . . . y . R `.`.P . . . . . . . . . . . . @+              ",
+"              @+. . . . . . . . L . . . . . v h.* #+F.).. . . . . . . . . . $+%++               ",
+"              k /.. . . . . . . . . . . . . T + * | m . . . J U . . . . . . &+G.+               ",
+"              + x *+J . . . . . . . . > . . e W p.. . . . g j U H.. . . m 1.4 +                 ",
+"                + + #+=+-+` 2 . g ;+>+x i U.. R . . . $+. d 2 . [.,+(.y.* + +                   ",
+"                    + + + + ) V.5 + + + + + W '+<.)+!+:.o.>.~+V.+ + + +                         ",
+"                                            + + + + + + + + + +                                 ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                "};
diff -purN ../lilypond-1.7.8/Documentation/topdocs/INSTALL.texi ./Documentation/topdocs/INSTALL.texi
--- ../lilypond-1.7.8/Documentation/topdocs/INSTALL.texi	2002-11-19 11:51:34.000000000 +0100
+++ ./Documentation/topdocs/INSTALL.texi	2002-11-29 19:58:41.000000000 +0100
@@ -322,20 +322,22 @@ and for the profiling version, I specify
 
 An Emacs mode for entering music and running LilyPond is contained in
 the source archive as @file{lilypond-mode.el},
-@file{lilypond-indent.el} and @file{lilypond-font-lock.el}. 
+@file{lilypond-indent.el}, @file{lilypond-font-lock.el} and 
+@file{lilypond.words}.
 You should install these files to a directory included in your 
-@var{load-path}. As a user, you may want add your source path or
-@file{~/site-lisp/} to your @var{load-path}. Append the following line 
-(modified) to your @file{~/.emacs} or @file{~/.emacs.el}:
+@var{load-path}. File @file{lilypond-init.el} should be placed to 
+@var{load-path}@file{/site-start.d/} or appended to your @file{~/.emacs}
+or @file{~/.emacs.el}. If you have installed a precompiled LilyPond 
+package, these files can be found in @file{/usr/share/doc/lilypond-x.y.z/}. 
+
+As a user, you may want add your source path or, e.g., @file{~/site-lisp/} 
+to your @var{load-path}. Append the following line (modified) to your 
+@file{~/.emacs}:
 @quotation
 @example
 (setq load-path (append (list (expand-file-name "~/site-lisp")) load-path))
 @end example
 @end quotation
-File @file{lilypond-init.el} should be placed to 
-@var{load-path}@file{/site-start.d/} or appended to your @file{~/.emacs}.
-If you have installed a precompiled LilyPond package, these files can be
-found in @file{/usr/share/doc/lilypond-x.y.z/}. 
 
 If you have the latest LilyPond-1.4.x Debian package, LilyPond-mode is
 automatically loaded, you not even need to modify your @code{~/.emacs}
@@ -345,10 +347,21 @@ file.
 
 A Vim mode for entering music and running LilyPond is contained in
 the source archive. Append the content of @file{vimrc} to @file{~/.vimrc}
-to get shortcuts. Install files @file{lilypond.vim} and @file{lilypond.words} 
-to @file{~/.vim/} to get syntax-highlighting and auto-completion,
-correspondingly.
-
+to get shortcuts. Install file @file{lilypond.words} to @file{~/.vim/} to 
+get auto-completion. Syntax highlighting you get by installing 
+@file{lilypond.vim} to @file{~/.vim/syntax/} and appending the following
+to @file{~/.vim/filetype.vim}:
+@quotation
+@example
+" my filetype file
+if exists("did_load_filetypes")
+  finish
+endif
+augroup filetypedetect
+  au! BufRead,BufNewFile  *.ly          setfiletype lilypond
+augroup
+@end example
+@end quotation
 
 @section Compiling for distributions 
 
diff -purN ../lilypond-1.7.8/Documentation/user/refman.itely ./Documentation/user/refman.itely
--- ../lilypond-1.7.8/Documentation/user/refman.itely	2002-11-19 11:51:35.000000000 +0100
+++ ./Documentation/user/refman.itely	2002-11-29 19:58:41.000000000 +0100
@@ -691,9 +691,10 @@ column location.
 @c move this elsewhere?
 
 LilyPond also comes with support files for emacs: lilypond-mode for
-emacs provides indentation, syntax coloring and handy compile
-short-cuts. If lilypond-mode is not installed on your platform, then
-refer to the installation instructions for more information
+emacs provides indentation, autocompletion, syntax coloring, handy
+compile short-cuts and reading Info documents of lilypond inside emacs.
+If lilypond-mode is not installed on your platform,
+then refer to the installation instructions for more information.
 
 @cindex emacs
 @cindex emacs mode
@@ -2400,7 +2401,8 @@ command can be
 @item 'end-repeat
  Print a :| bar line
 @item (volta . @var{text})
- Print a volta bracket saying @var{text}.
+ Print a volta bracket saying @var{text} (the text can be specified
+ as a text string or as a markup text, see @ref{Text markup}).
 @item (volta . #f)
  Stop a running volta bracket
 @end table
diff -purN ../lilypond-1.7.8/GNUmakefile.in ./GNUmakefile.in
--- ../lilypond-1.7.8/GNUmakefile.in	2002-11-19 11:51:34.000000000 +0100
+++ ./GNUmakefile.in	2002-11-29 19:58:40.000000000 +0100
@@ -20,7 +20,7 @@ SCRIPTS = configure aclocal.m4 autogen.s
 README_FILES =  ChangeLog  COPYING DEDICATION NEWS README.mandrake ROADMAP THANKS
 README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt
 IN_FILES := $(wildcard *.in)
-EXTRA_DIST_FILES = $(wildcard *.el) vimrc VERSION $(README_FILES)  $(SCRIPTS) $(IN_FILES)  emacsclient.patch lexer-gcc-3.0.patch server.el.patch darwin.patch .cvsignore  lexer-gcc-3.1.sh 
+EXTRA_DIST_FILES = $(wildcard *.el) vimrc VERSION $(README_FILES)  $(SCRIPTS) $(IN_FILES)  emacsclient.patch lexer-gcc-3.0.patch server.el.patch darwin.patch .cvsignore  lexer-gcc-3.1.sh  lilypond.words
 NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
 INSTALLATION_DIR=$(local_lilypond_datadir)
 INSTALLATION_FILES=$(configuration) VERSION
diff -purN ../lilypond-1.7.8/input/regression/beam-rest.ly ./input/regression/beam-rest.ly
--- ../lilypond-1.7.8/input/regression/beam-rest.ly	1970-01-01 01:00:00.000000000 +0100
+++ ./input/regression/beam-rest.ly	2002-11-20 01:17:08.000000000 +0100
@@ -0,0 +1,12 @@
+\header {
+ texidoc = "The number of beams doesn't change on a rest."
+}
+
+\version "1.7.7"
+
+\score { \notes \relative c, {
+  \clef bass	 
+  [e8 r16 f d'8 e16 e16] [c8 c16 r16 bes8 r16 c16-] |
+ }
+\paper { linewidth = -1.0 }
+}
diff -purN ../lilypond-1.7.8/input/regression/chord-tremolo.ly ./input/regression/chord-tremolo.ly
--- ../lilypond-1.7.8/input/regression/chord-tremolo.ly	2002-11-19 11:51:37.000000000 +0100
+++ ./input/regression/chord-tremolo.ly	2002-12-01 19:27:05.000000000 +0100
@@ -22,6 +22,9 @@ stems.
 	\break
 	\repeat "tremolo" 4 { f'8 e }
 	\repeat "tremolo" 2 { f e }
+	c4 c4
+
+	\repeat "tremolo" 3 { f8 e }
 	c4
 	c4 c4 c4 c4
 	c4 c4 c4 c4
@@ -33,4 +36,4 @@ stems.
   }  
   \midi { }
 }
-%% new-chords-done %%
\ No newline at end of file
+%% new-chords-done %%
diff -purN ../lilypond-1.7.8/input/regression/grace-auto-beam.ly ./input/regression/grace-auto-beam.ly
--- ../lilypond-1.7.8/input/regression/grace-auto-beam.ly	2002-11-19 11:51:37.000000000 +0100
+++ ./input/regression/grace-auto-beam.ly	2002-11-29 19:58:43.000000000 +0100
@@ -1,7 +1,7 @@
 \version "1.7.6"
 \header
 {
-    texidoc = "The autobeamer is not confusde by grace notes."
+    texidoc = "The autobeamer is not confused by grace notes."
 }
 
 \score{
diff -purN ../lilypond-1.7.8/input/regression/music-map.ly ./input/regression/music-map.ly
--- ../lilypond-1.7.8/input/regression/music-map.ly	1970-01-01 01:00:00.000000000 +0100
+++ ./input/regression/music-map.ly	2002-12-01 17:01:37.000000000 +0100
@@ -0,0 +1,39 @@
+\header {
+
+texidoc =
+
+"With @code{music-map}, you can apply functions operating on a single
+piece of music to an entire music expression. In this example, the the
+function @code{notes-to-skip} changes a note to a skip. When applied
+to an entire music expression in the 1st measure, the scripts and
+dynamics are left over. These are put onto the 2nd measure."
+
+}
+
+\version "1.7.8"
+
+#(define (notes-to-skip m)
+"Convert all stuff with duration (notes, lyrics, bass figures, etc.) to skips.
+Scripts and dynamics are maintained.
+"
+  (if (memq 'rhythmic-event (ly:get-mus-property m 'types))
+	(let* ((newmus 	  (make-music-by-name 'SkipEvent)))
+		(map
+		  (lambda (x) (ly:set-mus-property! newmus (car x) (cdr x)))
+		  (ly:get-mutable-properties m))
+		newmus
+	)
+	m)
+)
+
+
+foobar = \notes \transpose c c' { c4-\>-^ c4-^ c4-\!-^ c4-^  } 
+
+\score {
+  \notes \relative c''  \context Voice {
+	\foobar
+
+	< \apply #(lambda (x) (music-map notes-to-skip x))
+		\foobar
+	   { d2 d2 } > 
+}}
diff -purN ../lilypond-1.7.8/input/regression/new-markup-syntax.ly ./input/regression/new-markup-syntax.ly
--- ../lilypond-1.7.8/input/regression/new-markup-syntax.ly	1970-01-01 01:00:00.000000000 +0100
+++ ./input/regression/new-markup-syntax.ly	2002-12-01 17:01:26.000000000 +0100
@@ -0,0 +1,18 @@
+\header  {
+texidoc = "New markup syntax."
+}
+
+\version "1.7.8"
+
+
+\score {
+  \notes
+   {
+    \property Voice.TextScript \set #'molecule-callback = #brew-new-markup-molecule
+    f'-\markup { foo \bold bar \column < baz bazr >
+		\override #'(font-family . music) \lookup #"noteheads-0"
+	}
+
+    c''4
+    }
+}
diff -purN ../lilypond-1.7.8/input/test/to-xml.ly ./input/test/to-xml.ly
--- ../lilypond-1.7.8/input/test/to-xml.ly	2002-11-19 11:51:38.000000000 +0100
+++ ./input/test/to-xml.ly	2002-11-29 19:58:44.000000000 +0100
@@ -2,7 +2,7 @@
 
 fooBar = \notes { < c''4 \\ g'4 > }
 
-#(ly:set-parse-protect #f)
+#(ly:set-option 'parse-protect #f)
 #(load-from-path "to-xml.scm")
 
 #(music-to-xml fooBar (current-output-port))
diff -purN ../lilypond-1.7.8/lily/beam.cc ./lily/beam.cc
--- ../lilypond-1.7.8/lily/beam.cc	2002-11-19 11:51:39.000000000 +0100
+++ ./lily/beam.cc	2002-11-20 01:17:08.000000000 +0100
@@ -335,6 +335,7 @@ Beam::brew_molecule (SCM grob)
   SCM gap = me->get_grob_property ("gap");
   Molecule the_beam;
   Real lt = me->get_paper ()->get_var ("linethickness");
+  
   for (int i = 0; i< stems.size(); i++)
     {
       Grob * st =stems[i];
@@ -343,6 +344,11 @@ Beam::brew_molecule (SCM grob)
       Real xposn = st->relative_coordinate (xcommon, X_AXIS);
       Real stem_width = gh_scm2double (st->get_grob_property ("thickness")) *lt;
 
+      /*
+	We do the space left of ST, with lfliebertjes pointing to the
+	right from the left stem, and rfliebertjes pointing left from
+	right stem.
+       */
       if (i > 0)
 	{
 	  SCM left = gh_cdr (last_beaming);
@@ -408,18 +414,14 @@ Beam::brew_molecule (SCM grob)
 
 	  if (lfliebertjes.size() || rfliebertjes.size())
 	    {
-
 	      Real nw_f;
-	      if (!Stem::first_head (st))
-		nw_f = 0;
-	      else
-		{
-		  int t = Stem::duration_log (st); 
 
-		  SCM proc = me->get_grob_property ("flag-width-function");
-		  SCM result = gh_call1 (proc, scm_int2num (t));
-		  nw_f = gh_scm2double (result);
-		}
+	      int t = Stem::duration_log (st); 
+
+	      SCM proc = me->get_grob_property ("flag-width-function");
+	      SCM result = gh_call1 (proc, scm_int2num (t));
+	      nw_f = gh_scm2double (result);
+		
 	      
 	      /* Half beam should be one note-width,
 		 but let's make sure two half-beams never touch */
@@ -1273,13 +1275,18 @@ Beam::set_beaming (Grob *me, Beaming_inf
 	      ||(d == RIGHT && i == stems.size () -1))
 	    continue;
 
-
-	  SCM beaming_prop = stems[i]->get_grob_property ("beaming");
+	  Grob *st =  stems[i];
+	  SCM beaming_prop = st->get_grob_property ("beaming");
 	  if (beaming_prop == SCM_EOL ||
 	      index_get_cell (beaming_prop, d) == SCM_EOL)
 	    {
 	      int b = beaming->infos_.elem (i).beams_i_drul_[d];
-	      Stem::set_beaming (stems[i], b, d);
+	      if (i>0
+		  && i < stems.size() -1
+		  && Stem::invisible_b (st))
+		b = b <? beaming->infos_.elem(i).beams_i_drul_[-d];
+	      
+	      Stem::set_beaming (st, b, d);
 	    }
 	}
       while (flip (&d) != LEFT);
diff -purN ../lilypond-1.7.8/lily/beam-engraver.cc ./lily/beam-engraver.cc
--- ../lilypond-1.7.8/lily/beam-engraver.cc	2002-11-04 11:53:13.000000000 +0100
+++ ./lily/beam-engraver.cc	2002-11-20 01:17:08.000000000 +0100
@@ -235,6 +235,7 @@ Beam_engraver::stop_translation_timestep
       finished_beam_ = beam_;
       finished_beam_info_ = beam_info_;
 
+      now_stop_ev_ = 0;
       beam_ = 0;
       beam_info_ = 0;
       typeset_beam();
diff -purN ../lilypond-1.7.8/lily/font-interface.cc ./lily/font-interface.cc
--- ../lilypond-1.7.8/lily/font-interface.cc	2002-11-19 11:51:39.000000000 +0100
+++ ./lily/font-interface.cc	2002-12-01 17:01:37.000000000 +0100
@@ -49,15 +49,10 @@ MAKE_SCHEME_CALLBACK(Font_interface, get
 SCM
 Font_interface::get_property_alist_chain (SCM grob)
 {
-
   Grob * g = unsmob_grob (grob);
   SCM_ASSERT_TYPE(g, grob, SCM_ARG1, __FUNCTION__, "grob");
   return  font_alist_chain (g);
-  
 }
-  
-  
-
 
 /*
   todo: split up this func, reuse in text_item? 
@@ -86,33 +81,28 @@ LY_DEFINE(ly_font_interface_get_default_
 }
 
 LY_DEFINE(ly_font_interface_get_font,"ly:get-font", 2, 0, 0,
-	  (SCM grob, SCM alist),
-	  "Return a font metric satisfying the font-qualifiers in @var{alist}.
-
-
-The font object represents the metric information of a font. Every font
-that is loaded into LilyPond can be accessed via Scheme. 
-
-LilyPond only needs to know the dimension of glyph to be able to process
-them. This information is stored in font metric files. LilyPond can read
-two types of font-metrics: @TeX{} Font Metric files (TFM files) and
-Adobe Font Metric files (AFM files).  LilyPond will always try to load
-AFM files first since they are more versatile.
-
-")
+	  (SCM grob, SCM chain),
+	  "Return a font metric satisfying the font-qualifiers in the alist chain @var{chain}.\n"
+"\n"
+"The font object represents the metric information of a font. Every font\n"
+"that is loaded into LilyPond can be accessed via Scheme. \n"
+"\n"
+"LilyPond only needs to know the dimension of glyph to be able to process\n"
+"them. This information is stored in font metric files. LilyPond can read\n"
+"two types of font-metrics: @TeX{} Font Metric files (TFM files) and\n"
+"Adobe Font Metric files (AFM files).  LilyPond will always try to load\n"
+"AFM files first since they are more versatile.\n"
+"\n"
+"An alist chain is a list of alists.\n")
 {
   Grob * gr  = unsmob_grob (grob);
   SCM_ASSERT_TYPE(gr, grob, SCM_ARG1, __FUNCTION__, "grob");
 
-  Font_metric*fm=
-    Font_interface::get_font (gr, gh_cons (alist,
-					   Font_interface::font_alist_chain (gr)));
-
+  Font_metric*fm = Font_interface::get_font (gr, chain);
   return fm->self_scm();
 }
 
 
-
 Font_metric *
 Font_interface::get_font (Grob *me, SCM chain)
 {
diff -purN ../lilypond-1.7.8/lily/grob.cc ./lily/grob.cc
--- ../lilypond-1.7.8/lily/grob.cc	2002-11-19 12:48:06.000000000 +0100
+++ ./lily/grob.cc	2002-11-19 13:43:04.000000000 +0100
@@ -700,9 +700,8 @@ void
 Grob::warning (String s)const
 {
   SCM cause = self_scm();
-  while (cause != SCM_EOL && unsmob_music (cause))
+  while (Grob * g = unsmob_grob (cause))
     {
-      Grob * g = unsmob_grob (cause);
       cause = g->get_grob_property ("cause");
     }
 
@@ -827,37 +826,37 @@ ly_grobs2scm (Link_array<Grob> a)
 IMPLEMENT_TYPE_P (Grob, "ly:grob?");
 
 ADD_INTERFACE (Grob, "grob-interface",
-  "In music notation, lots of symbols are related in some way.  You can
-think of music notation as a graph where nodes are formed by the
-symbols, and the arcs by their relations. A grob is a node in that
-graph.  The directed edges in the graph are formed by references to
-other grobs (i.e. pointers).  This big graph of grobs specifies the
-notation problem. The solution of this problem is a description of the
-printout in closed form, i.e. a list of values.  These values are
-Molecules.
-
-All grobs have an X and Y-position on the page.  These X and Y positions
-are stored in a relative format, so they can easily be combined by
-stacking them, hanging one grob to the side of another, and coupling
-them into a grouping-grob.
-
-Each grob has a reference point (a.k.a.  parent): the position of a grob
-is stored relative to that reference point. For example the X-reference
-point of a staccato dot usually is the note head that it applies
-to. When the note head is moved, the staccato dot moves along
-automatically.
-
-A grob is often associated with a symbol, but some grobs do not print
-any symbols. They take care of grouping objects. For example, there is a
-separate grob that stacks staves vertically. The @ref{NoteCollision}
-is also an abstract grob: it only moves around chords, but doesn't print
-anything.
-",
-  "X-offset-callbacks Y-offset-callbacks X-extent-callback molecule cause
-Y-extent-callback molecule-callback extra-offset spacing-procedure
-staff-symbol interfaces dependencies X-extent Y-extent extra-X-extent
-causes meta layer before-line-breaking-callback
-after-line-breaking-callback extra-Y-extent minimum-X-extent
-minimum-Y-extent transparent");
+  "In music notation, lots of symbols are related in some way.  You can\n"
+"think of music notation as a graph where nodes are formed by the\n"
+"symbols, and the arcs by their relations. A grob is a node in that\n"
+"graph.  The directed edges in the graph are formed by references to\n"
+"other grobs (i.e. pointers).  This big graph of grobs specifies the\n"
+"notation problem. The solution of this problem is a description of the\n"
+"printout in closed form, i.e. a list of values.  These values are\n"
+"Molecules.\n"
+"\n"
+"All grobs have an X and Y-position on the page.  These X and Y positions\n"
+"are stored in a relative format, so they can easily be combined by\n"
+"stacking them, hanging one grob to the side of another, and coupling\n"
+"them into a grouping-grob.\n"
+"\n"
+"Each grob has a reference point (a.k.a.  parent): the position of a grob\n"
+"is stored relative to that reference point. For example the X-reference\n"
+"point of a staccato dot usually is the note head that it applies\n"
+"to. When the note head is moved, the staccato dot moves along\n"
+"automatically.\n"
+"\n"
+"A grob is often associated with a symbol, but some grobs do not print\n"
+"any symbols. They take care of grouping objects. For example, there is a\n"
+"separate grob that stacks staves vertically. The @ref{NoteCollision}\n"
+"is also an abstract grob: it only moves around chords, but doesn't print\n"
+"anything.\n"
+,
+  "X-offset-callbacks Y-offset-callbacks X-extent-callback molecule cause "
+"Y-extent-callback molecule-callback extra-offset spacing-procedure "
+"staff-symbol interfaces dependencies X-extent Y-extent extra-X-extent "
+"causes meta layer before-line-breaking-callback "
+"after-line-breaking-callback extra-Y-extent minimum-X-extent "
+"minimum-Y-extent transparent");
 
 
diff -purN ../lilypond-1.7.8/lily/grob-scheme.cc ./lily/grob-scheme.cc
--- ../lilypond-1.7.8/lily/grob-scheme.cc	2002-10-21 00:44:15.000000000 +0200
+++ ./lily/grob-scheme.cc	2002-11-29 19:58:45.000000000 +0100
@@ -5,13 +5,14 @@
 #include "paper-def.hh"
 #include "system.hh"
 
-LY_DEFINE(ly_set_grob_property,"ly:set-grob-property!", 3, 0, 0,
+
+LY_DEFINE (ly_set_grob_property,"ly:set-grob-property!", 3, 0, 0,
   (SCM grob, SCM sym, SCM val),
   "Set @var{sym} in grob @var{grob} to value @var{val}")
 {
   Grob * sc = unsmob_grob (grob);
-  SCM_ASSERT_TYPE(sc, grob, SCM_ARG1, __FUNCTION__, "grob");
-  SCM_ASSERT_TYPE(gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");  
+  SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
+  SCM_ASSERT_TYPE (gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");  
 
   if (!type_check_assignment (sym, val, ly_symbol2scm ("backend-type?")))
     error ("typecheck failed");
@@ -20,101 +21,95 @@ LY_DEFINE(ly_set_grob_property,"ly:set-g
   return SCM_UNSPECIFIED;
 }
 
-LY_DEFINE(ly_get_grob_property,
+LY_DEFINE (ly_get_grob_property,
 	  "ly:get-grob-property", 2, 0, 0, (SCM grob, SCM sym),
-	  "Get the value of a value in grob @var{g} of property @var{sym}. It
-will return @code{'()} (end-of-list) if @var{g} doesn't have @var{sym} set.
-
-Grob properties are stored as GUILE association lists, with symbols as
-keys. All lookup functions identify undefined properties with
-end-of-list (i.e. @code{'()} in Scheme or @code{SCM_EOL} in C)
-
-Properties are stored in two ways:
-@itemize @bullet
-@item mutable properties.
-Grob properties that change from object to object. The storage of
-these are private to a grob. For example pointers to other grobs are
-always stored in the mutable properties.
-
-@item immutable properties.
-Grob properties that are shared across different grobs of the same
-type. The storage is shared, and hence it is read-only. Typically, this
-is used to store function callbacks, and default settings. They are
-initially read from @file{scm/grob-description.scm}.
-@end itemize
-
-")
+	  "Get the value of a value in grob @var{g} of property @var{sym}. It\n"
+"will return @code{'()} (end-of-list) if @var{g} doesn't have @var{sym} set.\n"
+"\n"
+"Grob properties are stored as GUILE association lists, with symbols as\n"
+"keys. All lookup functions identify undefined properties with\n"
+"end-of-list (i.e. @code{'()} in Scheme or @code{SCM_EOL} in C)\n"
+"\n"
+"Properties are stored in two ways:\n"
+"@itemize @bullet\n"
+"@item mutable properties.\n"
+"Grob properties that change from object to object. The storage of\n"
+"these are private to a grob. For example pointers to other grobs are\n"
+"always stored in the mutable properties.\n"
+"\n"
+"@item immutable properties.\n"
+"Grob properties that are shared across different grobs of the same\n"
+"type. The storage is shared, and hence it is read-only. Typically, this\n"
+"is used to store function callbacks, and default settings. They are\n"
+"initially read from @file{scm/grob-description.scm}.\n"
+"@end itemize\n"
+"\n")
 {
   Grob * sc = unsmob_grob (grob);
-  SCM_ASSERT_TYPE(sc, grob, SCM_ARG1, __FUNCTION__, "grob");
-  SCM_ASSERT_TYPE(gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");  
+  SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
+  SCM_ASSERT_TYPE (gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");  
 
   return sc->internal_get_grob_property (sym);
 }
 
-LY_DEFINE(spanner_get_bound, "ly:get-spanner-bound", 2 , 0, 0,
-	  (SCM slur, SCM dir),
-	  "Get one of the bounds of @var{spanner}. @var{dir} may be @code{-1} for
-left, and @code{1} for right.
-")
+LY_DEFINE (spanner_get_bound, "ly:get-spanner-bound", 2 , 0, 0,
+	   (SCM slur, SCM dir),
+	   "Get one of the bounds of @var{spanner}. @var{dir} is @code{-1} "
+	   "for left, and @code{1} for right.")
 {
   Spanner * sl = dynamic_cast<Spanner*> (unsmob_grob (slur));
-  SCM_ASSERT_TYPE(sl, slur, SCM_ARG1, __FUNCTION__, "spanner grob");
-  SCM_ASSERT_TYPE(ly_dir_p (dir), slur, SCM_ARG2, __FUNCTION__, "dir");
+  SCM_ASSERT_TYPE (sl, slur, SCM_ARG1, __FUNCTION__, "spanner grob");
+  SCM_ASSERT_TYPE (ly_dir_p (dir), slur, SCM_ARG2, __FUNCTION__, "dir");
   return sl->get_bound (to_dir (dir))->self_scm ();
 }
 
-/*
-  TODO: make difference between scaled and unscalead variable in
-  calling (i.e different funcs.)
- */
-LY_DEFINE(ly_get_paper_var,"ly:get-paper-variable", 2, 0, 0,
+/* TODO: make difference between scaled and unscalead variable in
+   calling (i.e different funcs.) */
+LY_DEFINE (ly_get_paper_var,"ly:get-paper-variable", 2, 0, 0,
   (SCM grob, SCM sym),
   "Get a variable from the \\paper block.")
 {
   Grob * sc = unsmob_grob (grob);
-  SCM_ASSERT_TYPE(sc, grob, SCM_ARG1, __FUNCTION__, "grob");
-  SCM_ASSERT_TYPE(gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");  
+  SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
+  SCM_ASSERT_TYPE (gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");  
 
   return sc->get_paper () ->lookup_variable (sym);
 }
 
 
 
-LY_DEFINE(ly_get_extent, "ly:get-extent", 3, 0, 0,
-	  (SCM grob, SCM refp, SCM axis),
-	  "Get the extent in @var{axis} direction of @var{grob} relative to the
-grob @var{refp}")
+LY_DEFINE (ly_get_extent, "ly:get-extent", 3, 0, 0,
+	   (SCM grob, SCM refp, SCM axis),
+	   "Get the extent in @var{axis} direction of @var{grob} relative to "
+	   "the grob @var{refp}")
 {
   Grob * sc = unsmob_grob (grob);
   Grob * ref = unsmob_grob (refp);
-  SCM_ASSERT_TYPE(sc, grob, SCM_ARG1, __FUNCTION__, "grob");
-  SCM_ASSERT_TYPE(ref, refp, SCM_ARG2, __FUNCTION__, "grob");
+  SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
+  SCM_ASSERT_TYPE (ref, refp, SCM_ARG2, __FUNCTION__, "grob");
   
-  SCM_ASSERT_TYPE(ly_axis_p (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
+  SCM_ASSERT_TYPE (ly_axis_p (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
 
   return ly_interval2scm ( sc->extent (ref, Axis (gh_scm2int (axis))));
 }
 
-LY_DEFINE (ly_get_parent,   "ly:get-parent", 2, 0, 0, (SCM grob, SCM axis),
-	   "Get the parent of @var{grob}.  @var{axis} can be 0 for the X-axis, 1
-for the Y-axis.")
+LY_DEFINE (ly_get_parent, "ly:get-parent", 2, 0, 0, (SCM grob, SCM axis),
+	   "Get the parent of @var{grob}.  @var{axis} is 0 for the X-axis, "
+	   "1 for the Y-axis.")
 {
   Grob * sc = unsmob_grob (grob);
-  SCM_ASSERT_TYPE(sc, grob, SCM_ARG1, __FUNCTION__, "grob");
-  SCM_ASSERT_TYPE(ly_axis_p (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
+  SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
+  SCM_ASSERT_TYPE (ly_axis_p (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
 
   Grob * par = sc->get_parent (Axis (gh_scm2int (axis)));
-  return par ? par->self_scm() : SCM_EOL;
+  return par ? par->self_scm () : SCM_EOL;
 }
 
 /* ly prefix? */
 LY_DEFINE (get_system,
 	   "ly:get-system",
 	   1, 0, 0, (SCM grob),
-	   "
-Return the System Grob of @var{grob}.
-")
+	   "Return the System Grob of @var{grob}.")
 {
   Grob *me = unsmob_grob (grob);
   SCM_ASSERT_TYPE (me, grob, SCM_ARG1, __FUNCTION__, "grob");
@@ -129,9 +124,7 @@ Return the System Grob of @var{grob}.
 LY_DEFINE (get_original,
 	   "ly:get-original",
 	   1, 0, 0, (SCM grob),
-	   "
-Return the original Grob of @var{grob}
-")
+	   "Return the original Grob of @var{grob}")
 {
   Grob *me = unsmob_grob (grob);
   SCM_ASSERT_TYPE (me, grob, SCM_ARG1, __FUNCTION__, "grob");
@@ -140,17 +133,12 @@ Return the original Grob of @var{grob}
 
 
 /* ly prefix? spanner in name? */
-/*
-  TODO: maybe we should return a vector -- random access is more
-  logical for this list?
- */
+/* TODO: maybe we should return a vector -- random access is more
+  logical for this list? */
 
 LY_DEFINE (get_broken_into,
 	  "ly:get-broken-into", 1, 0, 0, (SCM spanner),
-	   "
-Return broken-into list for @var{spanner}.
-"
-)
+	   "Return broken-into list for @var{spanner}.")
 {
   ///  Spanner *me = unsmob_spanner (spanner);
   Spanner *me = dynamic_cast<Spanner*> (unsmob_grob (spanner));
diff -purN ../lilypond-1.7.8/lily/include/ligature-bracket.hh ./lily/include/ligature-bracket.hh
--- ../lilypond-1.7.8/lily/include/ligature-bracket.hh	2002-05-19 02:14:05.000000000 +0200
+++ ./lily/include/ligature-bracket.hh	1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-/*
-  ligature-bracket.hh -- part of GNU LilyPond
-
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 2002 Juergen Reuter <reuter@ipd.uka.de>
-*/
-
-#ifndef LIGATURE_BRACKET_HH
-#define LIGATURE_BRACKET_HH
-
-#include "lily-proto.hh"
-#include "lily-guile.hh"
-
-struct Ligature_bracket
-{
-  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
-  static bool has_interface (Grob*);
-};
-
-#endif /* LIGATURE_BRACKET_HH */
-
diff -purN ../lilypond-1.7.8/lily/include/my-lily-lexer.hh ./lily/include/my-lily-lexer.hh
--- ../lilypond-1.7.8/lily/include/my-lily-lexer.hh	2002-11-19 11:51:40.000000000 +0100
+++ ./lily/include/my-lily-lexer.hh	2002-12-01 17:01:38.000000000 +0100
@@ -59,6 +59,7 @@ public:
 
   SCM lookup_identifier (String s);
   void push_note_state ();
+  void push_markup_state ();
   void push_figuredbass_state ();
   void push_chord_state ();
   void push_lyric_state ();
diff -purN ../lilypond-1.7.8/lily/include/parse-scm.hh ./lily/include/parse-scm.hh
--- ../lilypond-1.7.8/lily/include/parse-scm.hh	2002-08-17 03:38:52.000000000 +0200
+++ ./lily/include/parse-scm.hh	2002-11-20 01:17:09.000000000 +0100
@@ -5,6 +5,8 @@
 #include "input.hh"
 #include "lily-guile.hh"
 
+extern bool parse_protect_global;
+
 struct Parse_start
 {
   char const* str;
diff -purN ../lilypond-1.7.8/lily/lexer.ll ./lily/lexer.ll
--- ../lilypond-1.7.8/lily/lexer.ll	2002-11-19 11:51:39.000000000 +0100
+++ ./lily/lexer.ll	2002-12-01 17:01:37.000000000 +0100
@@ -53,6 +53,8 @@ void strip_trailing_white (String&);
 void strip_leading_white (String&);
 String lyric_fudge (String s);
 
+SCM
+lookup_markup_command (String s);
 
 bool
 valid_version_b (String s);
@@ -78,6 +80,7 @@ SCM scan_fraction (String);
 SCM (* scm_parse_error_handler) (void *);
 
 
+
 %}
 
 %option c++
@@ -97,7 +100,7 @@ SCM (* scm_parse_error_handler) (void *)
 %x figures
 %x quote
 %x longcomment
-
+%x markup 
 
 A		[a-zA-Z]
 AA		{A}|_
@@ -251,7 +254,7 @@ HYPHEN		--
 	exit (1);
 }
 
-<INITIAL,chords,lyrics,notes,figures>#	{ //embedded scm
+<INITIAL,markup,chords,lyrics,notes,figures>#	{ //embedded scm
 	//char const* s = YYText () + 1;
 	char const* s = here_str0 ();
 	int n = 0;
@@ -261,6 +264,11 @@ HYPHEN		--
 		return SCM_T;
 	}
 	SCM sval = ly_parse_scm (s, &n, here_input());
+	if (sval == SCM_UNDEFINED)
+		{
+		sval = SCM_UNSPECIFIED;
+		errorlevel_ = 1;
+		}
 
 	for (int i=0; i < n; i++)
 	{
@@ -429,8 +437,58 @@ HYPHEN		--
 }
 
 
+<markup>{
+	\" {
+		start_quote ();
+	}
+	{NOTECOMMAND} {
+		String str (YYText() + 1);
+		SCM s = lookup_markup_command (str);
+
+		if (gh_pair_p (s)) {
+			yylval.scm = gh_car(s);
+			SCM tag = gh_cdr(s);
+			if (tag == ly_symbol2scm("markup0"))
+				return MARKUP_HEAD_MARKUP0;
+			else if (tag == ly_symbol2scm ("markup0-markup1"))
+				return MARKUP_HEAD_MARKUP0_MARKUP1;
+			else if (tag == ly_symbol2scm ("markup-list0"))
+				return MARKUP_HEAD_LIST0;
+			else if (tag == ly_symbol2scm ("scm0"))
+				return MARKUP_HEAD_SCM0;
+			else if (tag == ly_symbol2scm ("scm0-scm1"))
+				return MARKUP_HEAD_SCM0_SCM1;
+			else if (tag == ly_symbol2scm ("scm0-markup1"))
+				return MARKUP_HEAD_SCM0_MARKUP1;
+			else if (tag == ly_symbol2scm ("scm0-scm1-markup2"))
+				return MARKUP_HEAD_SCM0_SCM1_MARKUP2;
+			else {
+				ly_display_scm (s);
+				assert(false);
+			}
+		} else
+			return scan_escaped_word (str);
+	}
+	{LYRICS} {
+		String s (YYText ()); 
+
+		char c = s[s.length () - 1];
+		if (c == '{' ||  c == '}') // brace open is for not confusing dumb tools.
+			here_input ().warning (
+				_ ("Brace found at end of lyric.  Did you forget a space?"));
+		yylval.scm = scm_makfrom0str (s.to_str0 ());
 
 
+		return STRING;
+	}
+	{WHITE} {
+
+	}
+	. {
+		return YYText ()[0];
+	}
+}
+
 <<EOF>> {
 
 
@@ -535,6 +593,12 @@ My_lily_lexer::push_lyric_state ()
 }
 
 void
+My_lily_lexer::push_markup_state ()
+{
+	yy_push_state (markup);
+}
+
+void
 My_lily_lexer::pop_state ()
 {
 	yy_pop_state ();
@@ -674,6 +738,9 @@ valid_version_b (String s)
 }
 	
 
+/*
+  substittute _ adn \,
+*/
 String
 lyric_fudge (String s)
 {
@@ -730,3 +797,13 @@ avoid_silly_flex_induced_gcc_warnings ()
 	yy_top_state ();
 	avoid_silly_flex_induced_gcc_warnings ();
 }
+
+SCM
+lookup_markup_command (String s)
+{
+	static SCM proc ;
+	if (!proc)
+		proc = scm_c_eval_string ("lookup-markup-command");
+
+	return scm_call_1 (proc, scm_makfrom0str (s.to_str0 ()));
+}
diff -purN ../lilypond-1.7.8/lily/ligature-bracket.cc ./lily/ligature-bracket.cc
--- ../lilypond-1.7.8/lily/ligature-bracket.cc	2002-08-19 01:12:43.000000000 +0200
+++ ./lily/ligature-bracket.cc	1970-01-01 01:00:00.000000000 +0100
@@ -1,149 +0,0 @@
-/*
-  ligature-bracket.cc -- implement Ligature_bracket
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 2002 Juergen Reuter <reuter@ipd.uka.de>
-*/
-
-#include "ligature-bracket.hh"
-#include "item.hh"
-#include "paper-def.hh"
-#include "spanner.hh"
-#include "staff-symbol-referencer.hh"
-#include "lookup.hh"
-#include "box.hh"
-
-static Molecule
-brew_edge (Direction dir, Real thickness, Real width, Real height,
-	   Real blotdiameter)
-{
-  Molecule hline = Lookup::roundfilledbox (Box (Interval (0, width),
-						Interval (0, thickness)),
-					   blotdiameter);
-  hline.translate_axis (height - thickness, Y_AXIS);
-
-  Molecule vline = Lookup::roundfilledbox (Box (Interval (0, thickness),
-						Interval (0, height)),
-					   blotdiameter);
-  if (dir == RIGHT)
-    {
-      vline.translate_axis (width - thickness, X_AXIS);
-    }
-
-  Molecule edge = Molecule ();
-  edge.add_molecule (hline);
-  edge.add_molecule (vline);
-  return edge;
-}
-
-MAKE_SCHEME_CALLBACK (Ligature_bracket, brew_molecule, 1);
-SCM
-Ligature_bracket::brew_molecule (SCM smob)
-{
-  Grob *me = unsmob_grob (smob);
-  Spanner *spanner = dynamic_cast<Spanner*> (me);
-  Real blotdiameter = me->get_paper ()->get_var ("blotdiameter");
-  Real staff_space = Staff_symbol_referencer::staff_space (me);
-
-  Real thickness = me->get_paper ()->get_var ("linethickness");  
-  SCM grob_thickness = me->get_grob_property ("thickness");
-  if (gh_number_p (grob_thickness))
-    thickness *= gh_scm2double (grob_thickness);
-
-  SCM edge_width_scm = me->get_grob_property ("width");
-  Real edge_width;
-  if (gh_number_p (edge_width_scm))
-    {
-      edge_width = gh_scm2double (edge_width_scm);
-    }
-  else
-    {
-      edge_width = 0.75;
-    }
-  edge_width *= staff_space;
-
-  SCM edge_height_scm = me->get_grob_property ("height");
-  Real edge_height;
-  if (gh_number_p (edge_height_scm))
-    {
-      edge_height = gh_scm2double (edge_height_scm);
-    }
-  else
-    {
-      edge_height = 0.5;
-    }
-  edge_height *= staff_space;
-
-  Item* left_bound = spanner->get_bound (LEFT);
-  Item* right_bound = spanner->get_bound (RIGHT);
-
-  Molecule bracket = Molecule ();
-
-  Real y_min_offs =
-    0.5 * Staff_symbol_referencer::line_count (me) * staff_space;
-  Real y_left_offs = y_min_offs;
-  Real y_right_offs = y_min_offs;
-
-  Real left_bound_left_extent = 0;
-
-  if (left_bound)
-    {
-      Molecule left_edge =
-	brew_edge (LEFT, thickness, edge_width, edge_height, blotdiameter);
-      Grob *left_common_x = me->common_refpoint (left_bound, X_AXIS);
-      left_bound_left_extent =
-	left_bound->extent (left_common_x, X_AXIS)[LEFT];
-      left_edge.translate_axis (left_bound_left_extent, X_AXIS);
-      bracket.add_molecule (left_edge);
-      Grob *left_common_y = me->common_refpoint (left_bound, Y_AXIS);
-      y_left_offs =
-	max(y_left_offs, left_bound->extent (left_common_y, Y_AXIS)[UP]);
-    }
-  else
-    {
-      me->warning (_ ("no left bound"));
-    }
-
-  if (right_bound)
-    {
-      Molecule right_edge =
-	brew_edge (RIGHT, thickness, edge_width, edge_height, blotdiameter);
-      Grob *staff_symbol = Staff_symbol_referencer::get_staff_symbol (me);
-      Grob *right_common_bound_x =
-	right_bound->common_refpoint (staff_symbol, X_AXIS);
-
-      Real left_offs = 0;
-      if (left_bound)
-	{
-	  Grob *left_common_bound_x =
-	    left_bound->common_refpoint (staff_symbol, X_AXIS);
-	  left_offs = left_bound->extent (left_common_bound_x, X_AXIS)[LEFT];
-	}
-
-      Real right_offs =
-	right_bound->extent (right_common_bound_x, X_AXIS)[RIGHT];
-
-      right_edge.translate_axis (+ right_offs
-				 - left_offs
-				 + left_bound_left_extent
-				 - edge_width,
-				 X_AXIS);
-      bracket.add_molecule (right_edge);
-      Grob *right_common_y = me->common_refpoint (right_bound, Y_AXIS);
-      y_right_offs =
-	max(y_right_offs, right_bound->extent (right_common_y, Y_AXIS)[UP]);
-    }
-  else
-    {
-      me->warning (_ ("no left bound"));
-    }
-
-  bracket.translate_axis (max (y_left_offs, y_right_offs), Y_AXIS);
-
-  return bracket.smobbed_copy ();
-}
-
-ADD_INTERFACE (Ligature_bracket, "ligature-bracket-interface",
-	       "A bracket indicating a ligature in the original edition",
-	       "width thickness height ligature-primitive-callback");
diff -purN ../lilypond-1.7.8/lily/ligature-engraver.cc ./lily/ligature-engraver.cc
--- ../lilypond-1.7.8/lily/ligature-engraver.cc	2002-11-13 01:40:19.000000000 +0100
+++ ./lily/ligature-engraver.cc	2002-11-29 19:58:45.000000000 +0100
@@ -64,7 +64,7 @@ Ligature_engraver::try_music (Music *m)
 Spanner *
 Ligature_engraver::create_ligature_spanner ()
 {
-  return new Spanner (SCM_EOL);
+  return 0;
 }
 
 void
@@ -185,7 +185,7 @@ Ligature_engraver::acknowledge_grob (Gro
 
 ENTER_DESCRIPTION (Ligature_engraver,
 /* descr */       "Abstract class; a concrete subclass handles Ligature_events by engraving Ligatures in a concrete style.",
-/* creats*/       "Ligature",
+/* creats */      "",
 /* accepts */     "ligature-event abort-event",
 /* acks  */      "ligature-head-interface rest-interface",
 /* reads */       "",
diff -purN ../lilypond-1.7.8/lily/my-lily-lexer.cc ./lily/my-lily-lexer.cc
--- ../lilypond-1.7.8/lily/my-lily-lexer.cc	2002-11-19 11:51:39.000000000 +0100
+++ ./lily/my-lily-lexer.cc	2002-12-01 17:01:37.000000000 +0100
@@ -52,6 +52,7 @@ static Keyword_ent the_key_tab[]={
   {"lyrics", LYRICS},
   {"key", KEY},
   {"mark", MARK},
+  {"markup", MARKUP},
   {"once", ONCE},
   {"pitch", PITCH},
   {"time", TIME_T},
diff -purN ../lilypond-1.7.8/lily/paper-outputter.cc ./lily/paper-outputter.cc
--- ../lilypond-1.7.8/lily/paper-outputter.cc	2002-10-06 15:31:18.000000000 +0200
+++ ./lily/paper-outputter.cc	2002-11-29 19:58:45.000000000 +0100
@@ -52,26 +52,29 @@ Paper_outputter::Paper_outputter (String
 
 Paper_outputter::~Paper_outputter ()
 {
-  
+  scm_close_port (file_);
+  file_ = SCM_EOL;
 }
 
 
 void
 Paper_outputter::output_header ()
 {
-  String       generate = _ (", at ");
   time_t t (time (0));
-  generate += ctime (&t);
-  generate = generate.left_string (generate.length () - 1);
+  String generate = ctime (&t);
+  generate = generate.left_string (generate.length () - 1) + " " + *tzname;
+  
+  /* Fixed length time stamp */
+  generate = generate + to_string (' ', (50 - generate.length ()) >? 0);
   
-  /*
-    Make fixed length time stamps
-   */
-  generate = generate + to_string (' ' * (120 - generate.length ())>? 0)  ;
-  String creator = "lelie";
+  /* Fixed length creator string */
+  String creator = gnu_lilypond_version_string ();
+  creator += " (http://lilypond.org)";
+  creator = creator + to_string (' ', (50 - creator.length ()) >? 0);
   
   SCM args_scm = scm_list_n (scm_makfrom0str (creator.to_str0 ()),
-			     scm_makfrom0str (generate.to_str0 ()), SCM_UNDEFINED);
+			     scm_makfrom0str (generate.to_str0 ()),
+			     SCM_UNDEFINED);
 
 
   SCM scm = gh_cons (ly_symbol2scm ("header"), args_scm);
diff -purN ../lilypond-1.7.8/lily/parser.yy ./lily/parser.yy
--- ../lilypond-1.7.8/lily/parser.yy	2002-11-19 11:51:39.000000000 +0100
+++ ./lily/parser.yy	2002-12-01 17:01:37.000000000 +0100
@@ -274,6 +274,13 @@ yylex (YYSTYPE *s,  void * v)
 %token <i>	UNSIGNED
 %token <scm>   REAL
 
+%token MARKUP
+%token <scm> MARKUP_HEAD_MARKUP0 MARKUP_HEAD_SCM0_MARKUP1 MARKUP_HEAD_MARKUP0_MARKUP1
+%token <scm> MARKUP_HEAD_SCM0 MARKUP_HEAD_SCM0_MARKUP1 MARKUP_HEAD_SCM0_SCM1_MARKUP2 MARKUP_HEAD_SCM0_SCM1 
+
+%token <scm> MARKUP_IDENTIFIER MARKUP_HEAD_LIST0
+%type <scm> markup markup_line markup_list  markup_list_body full_markup 
+
 %type <outputdef> output_def
 %type <scm> 	lilypond_header lilypond_header_body
 %type <music>	open_event_parens close_event_parens open_event close_event
@@ -452,6 +459,9 @@ identifier_init:
 		$$ = $1->self_scm ();
 		scm_gc_unprotect_object ($$);
 	}
+	| full_markup {
+		$$ = $1;
+	}
 	| output_def {
 		$$ = $1->self_scm ();
 		scm_gc_unprotect_object ($$);
@@ -655,7 +665,7 @@ music_output_def_body:
 			music.
 		*/
 		int m = gh_scm2int ( $2->get_mus_property ("metronome-count"));
-		Duration *d = unsmob_duration ($2->get_mus_property ("duration"));
+		Duration *d = unsmob_duration ($2->get_mus_property ("tempo-unit"));
 		Midi_def * md = dynamic_cast<Midi_def*> ($$);
 		if (md)
 			md->set_tempo (d->get_length (), m);
@@ -668,7 +678,7 @@ music_output_def_body:
 tempo_event:
 	TEMPO steno_duration '=' bare_unsigned	{
 		$$ = MY_MAKE_MUSIC("TempoEvent");
-		$$->set_mus_property ("duration", $2);
+		$$->set_mus_property ("tempo-unit", $2);
 		$$->set_mus_property ("metronome-count", gh_int2scm ( $4));
 	}
 	;
@@ -1617,6 +1627,12 @@ gen_text_def:
 		t->set_spot (THIS->here_input ());
 		$$ = t;
 	}
+	| full_markup {
+		Music *t = MY_MAKE_MUSIC("TextScriptEvent");
+		t->set_mus_property ("text", $1);
+		t->set_spot (THIS->here_input ());
+		$$ = t;	
+	}
 	| string {
 		Music *t = MY_MAKE_MUSIC("TextScriptEvent");
 		t->set_mus_property ("text", $1);
@@ -2140,6 +2156,70 @@ questions:
 	;
 
 
+
+full_markup:
+	MARKUP 
+		{ THIS->lexer_->push_markup_state (); }
+	markup
+		{ $$ = $3;
+		  THIS->lexer_->pop_state ();
+		}
+	;
+	
+markup:
+	STRING {
+		static SCM simple;
+		if (!simple)
+			simple = scm_c_eval_string ("simple-markup");
+
+		$$ = scm_list_n (simple, $1, SCM_UNDEFINED);
+	}
+	| MARKUP_HEAD_MARKUP0 markup {
+		$$ = scm_list_n ($1, $2, SCM_UNDEFINED);
+	}
+	| MARKUP_HEAD_SCM0_MARKUP1 SCM_T markup {
+		$$  = scm_list_n ($1, $2, $3, SCM_UNDEFINED); 
+	}
+	| markup_line {
+		$$ = $1;
+	}
+	| MARKUP_HEAD_LIST0 markup_list {
+		$$ = scm_list_n ($1,$2, SCM_UNDEFINED);
+	}
+	| MARKUP_HEAD_SCM0 embedded_scm {
+		$$ = scm_list_n ($1, $2, SCM_UNDEFINED);
+	}
+	| MARKUP_HEAD_SCM0_SCM1_MARKUP2 embedded_scm embedded_scm markup {
+		$$ = scm_list_n ($1, $2, $3, $4, SCM_UNDEFINED);
+	}
+	| MARKUP_IDENTIFIER {
+		$$ = $1;
+	}
+	
+	;
+
+markup_list:
+	'<' markup_list_body '>' { $$ = scm_reverse_x ($2, SCM_EOL); }
+	;
+
+markup_line:
+	'{' markup_list_body '}' {
+		static SCM line ;
+		if (!line)
+			line = scm_c_eval_string ("line-markup");
+	
+		$$ = scm_list_n (line, scm_reverse_x ($2, SCM_EOL), SCM_UNDEFINED);
+	}
+	;
+
+markup_list_body:
+	/**/ {  $$ = SCM_EOL; }
+	| markup_list_body markup {
+		$$ = gh_cons ($2, $1) ;
+	}
+	;
+
+
 %%
 
 void
@@ -2184,6 +2264,13 @@ My_lily_parser::beam_check (SCM dur)
 }
 
 
+
+bool
+markup_p (SCM x)
+{
+	return gh_pair_p (x)
+		&& SCM_BOOL_F != scm_object_property (gh_car (x), ly_symbol2scm ("markup-signature"));
+}
 /*
 It is a little strange, to have this function in this file, but
 otherwise, we have to import music classes into the lexer.
@@ -2220,36 +2307,10 @@ My_lily_lexer::try_special_identifiers (
 
 		*destination = p->self_scm();
 		return MUSIC_OUTPUT_DEF_IDENTIFIER;
+	} else if (markup_p (sid)) {
+		*destination = sid;
+		return MARKUP_IDENTIFIER;
 	}
+
 	return -1;	
 }
-#if 0
-
-markup:
-	STRING {
-		$$ = scm_list_n (scm_c_eval_string ("simple-markup"), $1, SCM_UNDEFINED);
-	}
-	| MARKUP_HEAD0 markup
-	| MARKUP_HEAD1 SCM_T markup
-	| MARKUP_HEAD2 markup
-	| MARKUP_LIST_HEAD 
-	| MARKUP_LIST_HEAD 
-	| markup_list {
-		$$ = $1 
-	;
-
-markup_list:
-	'<' markup_list_body '>' { $$ = scm_reverse_x ($1, SCM_EOL); }
-	;
-
-markup_line:
-	'{' markup_list_body '}' { $$ = .. scm_reverse_x ($1, SCM_EOL); }
-	
-	;
-markup_list_body:
-	/**/ {  $$ = SCM_EOL; }
-	markup_list_body markup {
-		$$ = gh_cons ($2, $1) ;
-	}
-	;
-#endif
diff -purN ../lilypond-1.7.8/lily/parse-scm.cc ./lily/parse-scm.cc
--- ../lilypond-1.7.8/lily/parse-scm.cc	2002-10-21 00:44:15.000000000 +0200
+++ ./lily/parse-scm.cc	2002-11-29 19:58:45.000000000 +0100
@@ -87,7 +87,7 @@ parse_handler (void * data, SCM tag, SCM
    */
   ps->nchars = 1;
     
-  return SCM_EOL;
+  return SCM_UNDEFINED;
 }
 
 /*
@@ -109,21 +109,13 @@ protected_ly_parse_scm (Parse_start *ps)
 			     &catch_protected_parse_body,
 			     (void*)ps,
 			     &parse_handler, (void*)ps);
-
 }
 
+bool  parse_protect_global  = true; 
 
-static bool protect = true;
-
-LY_DEFINE(set_parse_protect, "ly:set-parse-protect",
-	  1,0,0, (SCM t),
-	  "If protection is switched on, errors in inline scheme are caught.
-If off, GUILE will halt on errors, and give a stack trace. Default is protected evaluation.")
-{
-  protect =  (t == SCM_BOOL_T);
-  return SCM_UNSPECIFIED;
-}
-
+/*
+  Try parsing. If failure, then return SCM_UNDEFINED.
+ */
 SCM
 ly_parse_scm (char const* s, int *n, Input i)
 {
@@ -132,9 +124,10 @@ ly_parse_scm (char const* s, int *n, Inp
   ps.str = s;
   ps.start_location_ = i;
 
-  SCM ans = protect ? protected_ly_parse_scm (&ps)
+  SCM ans = parse_protect_global ? protected_ly_parse_scm (&ps)
     : internal_ly_parse_scm (&ps);
   *n = ps.nchars;
+
   return ans;  
 }
 
diff -purN ../lilypond-1.7.8/lily/scm-option.cc ./lily/scm-option.cc
--- ../lilypond-1.7.8/lily/scm-option.cc	2002-10-21 00:44:15.000000000 +0200
+++ ./lily/scm-option.cc	2002-11-29 19:58:46.000000000 +0100
@@ -8,6 +8,7 @@
  */
 #include <stdio.h>
 
+#include "parse-scm.hh"
 #include "string.hh"
 #include "lily-guile.hh"
 #include "scm-option.hh"
@@ -56,6 +57,7 @@ LY_DEFINE (ly_option_usage, "ly:option-u
   printf ( "  help ANY-SYMBOL\n"
 	   "  internal-type-checking BOOLEAN\n"
 	   "  midi-debug BOOLEAN\n"
+	   "  parse-protect BOOLEAN\n"
 	   "  testing-level INTEGER\n");
   
   exit (0);
@@ -69,22 +71,23 @@ don't timestamp the output
 
 @item -t,--test
 Switch on any experimental features.  Not for general public use. */
-
 LY_DEFINE (ly_set_option, "ly:set-option", 2, 0, 0, (SCM var, SCM val),
-	    "Set a global option value.  Supported options include
-
-@table @code
-@item help
-List all options.
-@item midi-debug
-If set to true, generate human readable MIDI
-@item internal-type-checking
-Set paranoia for property assignments 
-@end table
-
-This function is useful to call from the command line: @code{lilypond -e
-\"(ly-set-option 'midi-debug #t)\"}.
-")
+	    "Set a global option value.  Supported options include\n"
+"\n"
+"@table @code\n"
+"@item help\n"
+"List all options.\n"
+"@item midi-debug\n"
+"If set to true, generate human readable MIDI\n"
+"@item internal-type-checking\n"
+"Set paranoia for property assignments\n"
+"@item parse-protect\n"
+"If protection is switched on, errors in inline scheme are caught in the parser. \n"
+"If off, GUILE will halt on errors, and give a stack trace. Default is protected evaluation. \n"
+"@end table\n"
+"\n"
+"This function is useful to call from the command line: @code{lilypond -e\n"
+"\"(ly-set-option 'midi-debug #t)\"}.\n")
 {
   if (var == ly_symbol2scm ("help"))
     {
@@ -99,6 +102,10 @@ This function is useful to call from the
     {
      testing_level_global = gh_scm2int (val); 
     }
+  else if (var == ly_symbol2scm ("parse-protect" ))
+    {
+      parse_protect_global = to_boolean(val);
+    }
   else if (var == ly_symbol2scm ("internal-type-checking"))
     {
      internal_type_checking_global_b = to_boolean (val); 
@@ -114,18 +121,14 @@ This function is useful to call from the
 
 	
       */
-
       ;
     }
   else
     {
       warning (_("Unknown internal option!"));
     }
-  
 
   return SCM_UNSPECIFIED;
 }
 
 
-
-
diff -purN ../lilypond-1.7.8/lily/span-bar.cc ./lily/span-bar.cc
--- ../lilypond-1.7.8/lily/span-bar.cc	2002-08-05 11:37:21.000000000 +0200
+++ ./lily/span-bar.cc	2002-11-29 19:58:46.000000000 +0100
@@ -27,8 +27,7 @@ Span_bar::add_bar (Grob*me, Grob*b)
 
 MAKE_SCHEME_CALLBACK (Span_bar,brew_molecule,1);
 
-/*
-  Limitations/Bugs:
+/* Limitations/Bugs:
 
    (1) Elements from 'me->get_grob_property ("elements")' must be
    ordered according to their y coordinates relative to their common
@@ -42,20 +41,17 @@ MAKE_SCHEME_CALLBACK (Span_bar,brew_mole
    (2) This method depends on bar_engraver not being removed from
    staff context.  If bar_engraver is removed, the size of the staff
    lines is evaluated as 0, which results in a solid span bar line
-   with faulty y coordinate.
- */
+   with faulty y coordinate. */
 
-/*
-  This routine was originally by Juergen Reuter, but it was a on the
-  bulky side. Rewritten by Han-Wen. 
- */
+/* This routine was originally by Juergen Reuter, but it was a on the
+   bulky side. Rewritten by Han-Wen. */
 SCM
 Span_bar::brew_molecule (SCM smobbed_me) 
 {
   Grob *me = unsmob_grob (smobbed_me);
   SCM first_elt = me->get_grob_property ("elements");
 
-  // compute common refpoint of elements
+  /* compute common refpoint of elements */
   Grob *refp = me;
   for (SCM elts = first_elt; gh_pair_p (elts); elts = ly_cdr (elts))
     {
@@ -64,19 +60,17 @@ Span_bar::brew_molecule (SCM smobbed_me)
       refp = staff_bar->common_refpoint (refp, Y_AXIS);
     }
 
-  Span_bar::evaluate_glyph(me);
+  Span_bar::evaluate_glyph (me);
   SCM glyph = me->get_grob_property ("glyph");
 
-  /*
-    glyph may not be a string, when ME is killed by Hara Kiri in
-    between.
-  */
+  /* glyph may not be a string, when ME is killed by Hara Kiri in
+    between. */
   if (!gh_string_p (glyph))
     return SCM_EOL;
   
   String glyph_string = ly_scm2string (glyph);
 
-  // compose span_bar_mol
+  /* compose span_bar_mol */
   Molecule span_bar_mol;
 
   Interval prev_extent;
@@ -90,18 +84,18 @@ Span_bar::brew_molecule (SCM smobbed_me)
       
       if (!prev_extent.empty_b ())
 	{
-	  Interval l(prev_extent [UP],
+	  Interval l (prev_extent [UP],
 		     ext[DOWN]);
 
 	  if (l.empty_b ())
 	    {
-	      /* there is  overlap between the bar lines. We do nothign here.
-	       */
+	      /* There is overlap between the bar lines.  Do nothing. */
 	    }
 	  else
 	    {
-	      Molecule interbar
-		= Bar_line::compound_barline (staff_bar, glyph_string, l.length());
+	      Molecule interbar = Bar_line::compound_barline (staff_bar,
+							      glyph_string,
+							      l.length ());
 	      interbar.translate_axis (l.center (), Y_AXIS);
 	      span_bar_mol.add_molecule (interbar);
 	    }
@@ -109,7 +103,8 @@ Span_bar::brew_molecule (SCM smobbed_me)
       prev_extent = ext;
     }
 
-  span_bar_mol.translate_axis (- me->relative_coordinate (refp, Y_AXIS), Y_AXIS);
+  span_bar_mol.translate_axis (- me->relative_coordinate (refp, Y_AXIS),
+			       Y_AXIS);
   
   return span_bar_mol.smobbed_copy ();
 }
@@ -138,10 +133,9 @@ Span_bar::before_line_breaking (SCM smob
   evaluate_empty (unsmob_grob (smob));
   evaluate_glyph (unsmob_grob (smob));
 
-  /*
-    no need to call   Bar_line::before_line_breaking (), because the info
-    in ELEMENTS already has been procced by Bar_line::before_line_breaking ().
-  */
+  /* No need to call Bar_line::before_line_breaking (), because the info
+     in ELEMENTS already has been procced by
+     Bar_line::before_line_breaking (). */
   return SCM_UNSPECIFIED;
 }
 
@@ -155,10 +149,9 @@ Span_bar::center_on_spanned_callback (SC
   assert (a == Y_AXIS);
   Interval i (get_spanned_interval (me));
 
-  /*
-    Bar_line::brew_molecule delivers a barline of y-extent (-h/2,h/2), so
-    we have to translate ourselves to be in the center of the 
-    interval that we span.  */
+  /* Bar_line::brew_molecule delivers a barline of y-extent (-h/2,h/2), so
+     we have to translate ourselves to be in the center of the 
+     interval that we span. */
   if (i.empty_b ())
     {
       me->suicide ();
@@ -171,12 +164,9 @@ Span_bar::center_on_spanned_callback (SC
 void
 Span_bar::evaluate_empty (Grob*me)
 {
-  /*
-    TODO: filter all hara-kiried out of ELEMENS list, and then
-    optionally do suicide. Call this cleanage function from
-    center_on_spanned_callback () as well.
-    
-   */
+  /* TODO: filter all hara-kiried out of ELEMENS list, and then
+     optionally do suicide. Call this cleanage function from
+     center_on_spanned_callback () as well. */
   if (!gh_pair_p (me->get_grob_property ("elements")))
     {
       me->suicide ();
@@ -192,7 +182,8 @@ Span_bar::evaluate_glyph (Grob*me)
 
   while (gh_pair_p (elts))
     {
-      gl =  unsmob_grob (gh_car (elts))->internal_get_grob_property (glyph_symbol);
+      gl = unsmob_grob (gh_car (elts))
+	->internal_get_grob_property (glyph_symbol);
       if (gh_string_p (gl))
 	break;
       elts =gh_cdr (elts);
@@ -219,14 +210,16 @@ Span_bar::evaluate_glyph (Grob*me)
     }
 
   gl = scm_makfrom0str (type.to_str0 ());
-  if (scm_equal_p (me->internal_get_grob_property (glyph_symbol), gl) != SCM_BOOL_T)
+  if (scm_equal_p (me->internal_get_grob_property (glyph_symbol), gl)
+      != SCM_BOOL_T)
     me->internal_set_grob_property (glyph_symbol, gl);
 }
 
 Interval
 Span_bar::get_spanned_interval (Grob*me) 
 {
-  return ly_scm2interval (Axis_group_interface::group_extent_callback (me->self_scm (), gh_int2scm (Y_AXIS))); 
+  return ly_scm2interval (Axis_group_interface::group_extent_callback
+			  (me->self_scm (), gh_int2scm (Y_AXIS))); 
 }
 
 
@@ -238,9 +231,7 @@ Span_bar::get_bar_size (SCM smob)
   Interval iv (get_spanned_interval (me));
   if (iv.empty_b ())
     {
-      /*
-	This happens if the bars are hara-kiried from under us.
-      */
+      /* This happens if the bars are hara-kiried from under us. */
       me->suicide ();
       return gh_double2scm (-1);
     }
diff -purN ../lilypond-1.7.8/lily/tempo-performer.cc ./lily/tempo-performer.cc
--- ../lilypond-1.7.8/lily/tempo-performer.cc	2002-09-30 11:23:43.000000000 +0200
+++ ./lily/tempo-performer.cc	2002-11-29 19:58:46.000000000 +0100
@@ -45,7 +45,7 @@ Tempo_performer::create_audio_elements (
     {
 
       SCM met = tempo_req_->get_mus_property ("metronome-count");
-      Duration *d = unsmob_duration (tempo_req_->get_mus_property ("duration"));
+      Duration *d = unsmob_duration (tempo_req_->get_mus_property ("tempo-unit"));
       
       Rational r =  (d->get_length () / Moment (Rational (1, 4)) * Moment (gh_scm2int (met))).main_part_;
       
diff -purN ../lilypond-1.7.8/lily/time-signature.cc ./lily/time-signature.cc
--- ../lilypond-1.7.8/lily/time-signature.cc	2002-09-20 11:21:08.000000000 +0200
+++ ./lily/time-signature.cc	2002-11-29 19:58:46.000000000 +0100
@@ -16,10 +16,8 @@
 #include "warn.hh"
 #include "staff-symbol-referencer.hh"
 
-MAKE_SCHEME_CALLBACK (Time_signature,brew_molecule,1);
-/*
-  TODO: make different functions for special and normal timesigs.
- */
+MAKE_SCHEME_CALLBACK (Time_signature, brew_molecule, 1);
+/* TODO: make different functions for special and normal timesigs. */
 SCM
 Time_signature::brew_molecule (SCM smob) 
 {
@@ -79,15 +77,13 @@ Time_signature::special_time_signature (
 
   String char_name = style + to_string (n) + "/" + to_string (d);
   me->set_grob_property ("font-family", ly_symbol2scm ("music"));
-  Molecule out =
-    Font_interface::get_default_font (me)->find_by_name ("timesig-" + char_name);
+  Molecule out = Font_interface::get_default_font (me)
+    ->find_by_name ("timesig-" + char_name);
   if (!out.empty_b ())
     return out;
 
-  /*
-    If there is no such symbol, we default to the numbered style.
-    (Here really with a warning!)
-  */
+  /* If there is no such symbol, we default to the numbered style.
+    (Here really with a warning!) */
   me->warning (_f ("time signature symbol `%s' not found; "
 		   "reverting to numbered style", char_name));
   return numbered_time_signature (me, n, d);
@@ -97,14 +93,14 @@ Molecule
 Time_signature::numbered_time_signature (Grob*me,int num, int den)
 {
   SCM chain = Font_interface::font_alist_chain (me);
-  me->set_grob_property("font-family", ly_symbol2scm ("number"));
+  me->set_grob_property ("font-family", ly_symbol2scm ("number"));
 
-  Molecule n = Text_item::text2molecule (me,
-					 scm_makfrom0str (to_string (num).to_str0 ()),
-					 chain);
-  Molecule d = Text_item::text2molecule (me,
-					 scm_makfrom0str (to_string (den).to_str0 ()),
-					 chain);
+  Molecule n =
+    Text_item::text2molecule (me, scm_makfrom0str (to_string (num).to_str0 ()),
+			      chain);
+  Molecule d =
+    Text_item::text2molecule (me, scm_makfrom0str (to_string (den).to_str0 ()),
+			      chain);
   n.align_to (X_AXIS, CENTER);
   d.align_to (X_AXIS, CENTER);
   Molecule m;
@@ -124,7 +120,7 @@ Time_signature::numbered_time_signature 
   return m;
 }
 
-ADD_INTERFACE (Time_signature,"time-signature-interface",
+ADD_INTERFACE (Time_signature, "time-signature-interface",
   "A time signature, in different styles.
   The following values for 'style are are recognized:
 
diff -purN ../lilypond-1.7.8/lily/timing-engraver.cc ./lily/timing-engraver.cc
--- ../lilypond-1.7.8/lily/timing-engraver.cc	2002-09-28 17:55:37.000000000 +0200
+++ ./lily/timing-engraver.cc	2002-11-29 19:58:46.000000000 +0100
@@ -19,16 +19,14 @@
 class Timing_engraver : public Timing_translator, public Engraver
 {
 protected:
-  /*
-    Needed to know whether we're advancing in grace notes, or not.
-   */
+  /* Needed to know whether we're advancing in grace notes, or not. */
   Moment last_moment_;
   
   virtual void start_translation_timestep ();
   virtual void stop_translation_timestep ();
 
 public:
-  TRANSLATOR_DECLARATIONS(Timing_engraver);
+  TRANSLATOR_DECLARATIONS (Timing_engraver);
 };
 
 
@@ -48,21 +46,21 @@ Timing_engraver::start_translation_times
   Moment now = now_mom ();
   SCM which = get_property ("whichBar");
 
-  /*
-    Set the first bar of the score? 
-   */
+  /* Set the first bar of the score? */
   if (!gh_string_p (which))
     which
       = (now.main_part_ || now.main_part_ == last_moment_.main_part_)
       ? SCM_EOL : scm_makfrom0str ("|");
 
   Moment mp = measure_position ();
-  bool start_of_measure = (last_moment_.main_part_ != now.main_part_&& !mp.main_part_  );
+  bool start_of_measure = (last_moment_.main_part_ != now.main_part_
+			   && !mp.main_part_);
 
   if (start_of_measure)
     {
-      Moment mlen = Moment(measure_length ());
-      unsmob_grob (get_property ("currentCommandColumn"))->set_grob_property ("measure-length", mlen.smobbed_copy()); 
+      Moment mlen = Moment (measure_length ());
+      unsmob_grob (get_property ("currentCommandColumn"))
+	->set_grob_property ("measure-length", mlen.smobbed_copy ()); 
     }
   
   if (!gh_string_p (which) && !to_boolean (nonauto))
@@ -89,7 +87,7 @@ Timing_engraver::stop_translation_timest
 }
 
 
-ENTER_DESCRIPTION(Timing_engraver,
+ENTER_DESCRIPTION (Timing_engraver,
 /* descr */       " Responsible for synchronizing timing information from staves. 
 Normally in @code{Score}.  In order to create polyrhythmic music,
 this engraver should be removed from @code{Score} and placed in
diff -purN ../lilypond-1.7.8/lily/volta-engraver.cc ./lily/volta-engraver.cc
--- ../lilypond-1.7.8/lily/volta-engraver.cc	2002-10-09 17:14:35.000000000 +0200
+++ ./lily/volta-engraver.cc	2002-11-29 19:58:46.000000000 +0100
@@ -117,7 +117,8 @@ Volta_engraver::process_music ()
       volta_span_ =0;
     }
 
-  if (gh_string_p (start_string_) && volta_span_)
+  if (volta_span_ && 
+      (gh_string_p (start_string_) || gh_pair_p (start_string_)))
     {
       warning (_ ("Already have a volta spanner.  Stopping that one prematurely."));
       
@@ -138,7 +139,8 @@ Volta_engraver::process_music ()
 void
 Volta_engraver::process_acknowledged_grobs ()
 {
-  if (!volta_span_ && gh_string_p (start_string_))
+  if (!volta_span_ && 
+      (gh_string_p (start_string_) || gh_pair_p (start_string_)))
     {
       started_mom_ = now_mom () ;
 
diff -purN ../lilypond-1.7.8/lilypond-font-lock.el ./lilypond-font-lock.el
--- ../lilypond-1.7.8/lilypond-font-lock.el	2002-10-13 00:49:55.000000000 +0200
+++ ./lilypond-font-lock.el	2002-11-29 19:58:40.000000000 +0100
@@ -2,15 +2,16 @@
 
 ;; Copyright (C) 1992,1993,1994  Tim Peters
 
-;; Author: 2001: Heikki Junes
+;; Author: 2001-2002: Heikki Junes
 ;;  * Emacs-mode: new keywords, reserved words, identifiers, notenames, 
 ;;    some dynamics and brackets are font-lock-keywords
+;;  * File lilypond.words gives keywords, identifiers and reserved words
 ;; Author: 1997: Han-Wen Nienhuys
 ;; Author: 1995-1996 Barry A. Warsaw
 ;;         1992-1994 Tim Peters
 ;; Created:       Feb 1992
-;; Version:       1.5.52
-;; Last Modified: 13APR2002
+;; Version:       1.7.8
+;; Last Modified: 23NOV2002
 ;; Keywords: lilypond languages music notation
 
 ;; This software is provided as-is, without express or implied
@@ -27,89 +28,9 @@
 ;;   - handle lexer modes (\header, \melodic, \lyric) etc.
 
 (defconst LilyPond-font-lock-keywords
-  (let* ((keywords '( ; need special order due to over[lapping] of words
-
-;; all letters are lowercase
-"accent" "accepts" "accompany" "\\(add\\)?lyrics" 
-"\\(aeol\\|dor\\|ion\\|locr\\|\\(mixo\\)?lyd\\|phryg\\)ian" 
-"alias" "\\(altern\\|rel\\)ative" "apply" "arpeggio" "autochange" "bar" "break"
-"breathe" "beamintervals" "broken" "blend" "\\(bc\\|end\\)incipit" 
-"ch\\(ar\\)?" "cg" "chord\\(s\\|stest\\|\\(chord\\)?modifiers\\)?"
-"clef[ \t]*\"?\\(F\\|G\\|alto\\|baritone\\|bass\\|\\(mezzo\\)?soprano\\|treble\\|violin\\|tenor\\)?\"?"
-"clipping" "[cm]m" "coda" "complex" 
-"\\(command\\)?spanrequest" "consists\\(end\\)?"
-"context" "contrabasso" "\\(de\\)?cr" "default" "denies" "different" "dirs"
-"down\\(bow\\|prall\\)?" "duration" "\\(text\\)?script"
-"eccentric" "eg" "embeddedps" "elementdescriptions" "\\(end\\)?cresc"
-"ex\\(treme\\)?" "fermata" "f+" "figures" "font" "flageolet" "fp" "fragment" 
-"s?fz" "gliss\\(ando\\)?" "gg" "gmsus" "grace" "gr\\(and\\)?staff"
-"header" "\\(h\\|v\\)size" "in\\(clude\\|versions\\|visible\\)?" 
-"key\\(s\\(ignature\\)?\\)?" "lag" "\\(l\\|r\\)heel" "line\\(break\\|prall\\)"
-"longa" "lower" "\\(l\\|r\\)toe"
-"mark" "marcato" "maxima" "mel\\(isma\\|ody\\)?" "midi" "m\\(aj\\|in\\)or"
-"\\(up\\|down\\)?mordent" "monstrous" "multipart" "music"
-"\\(musical\\)?pitch" "m\\(p\\|f\\|m\\)?" "name" "newpage" "noise\\(beat\\)?"
-"normal\\(key\\|size\\)" "\\(note\\|pitch\\)?names" "notes" "nt?"
-"one\\(staff\\)?" "open" "\\(output\\)?property" "over\\(ride\\)?"
-"part\\(combine\\|ial\\)" "penalty" "p+" "pt" 
-"prall\\(down\\|mordent\\|prall\\|up\\)?" "quickmeasure" "rc\\(ed\\)?" "remove"
-"repeat[ \t]*\\(\\(un\\)?fold\\|percent\\|\\|tremolo\\|volta\\)?" "rest"
-"revert" "\\(reverse\\)?turn" "rfz?" "rhythm"
-"right" "scales?" "scheme" "\\(sc\\)?paper" "\\(sc\\)?score" "sd"
-"segno" "sequential" "set\\(tings\\)?" "shortlong"
-"simultaneous" "singlepart" "skip" "small" "\\(smart\\)?transpose"
-"s[pf]+" "staccat\\(issim\\)?o" "staff\\(height\\|space\\)" "start" 
-"stop\\(ped\\)?"
-"st\\(paper\\|score\\)" "stuff" "su" "tab" "tempo" "tenuto" 
-"thenotes" "thrd" "threevoice" "thumb" "tilt\\(down\\|up\\)" 
-"timb" "times?" "tiny" "toeters" "touch" "translator" 
-"trill" "type" "t\\(wo\\(voice\\(steminvert\\)?\\)?\\)?" 
-"un\\(der\\|set\\)" "up\\(bow\\|per\\|prall\\)?" "version" 
-"visible" "voicedefault" "x"
-
-		      ))
-
-  (identifiers '( 
-
-;; in principle, have one or more uppercase letters
-"\\(\\(BarNumbering\\|\\(Inner\\)?Choir\\|Grand\\|HaraKiri\\|OrchestralPart\\|Piano\\|Rhythmic\\)?Staff\\|\\(Cue\\|Lyrics\\)?Voice\\|\\(Orchestral\\)?Score\\|ChordNames\\|FiguredBass\\|Grace\\|Lyrics\\|NoteNames\\|\\(Inner\\)?Staff\\(Group\\|Container\\)?\\|Thread\\)Context" ; *Context
-"\\(script\\|dots\\|dynamic\\|slur\\|stem\\|sustain\\|sostenuto\\|unaCorda\\|treCorde\\|tie\\|tuplet\\)\\(Both\\|Down\\|Up\\)" ; *(Both/Down/Up)
-"\\(slur\\|tie\\)\\(Dotted\\|Solid\\)" ; *(Dotted/Solid)
-"\\(autoBeam\\|cadenza\\|impro\\|turn\\)\\(Off\\|On\\)" ; *(On/Off)
-"\\(empty\\|fat\\)Text" ; *Text
-"shift\\(On+\\|Off\\|I\\|II\\|III\\|IV\\|V\\)" ; shift*
-"EasyNotation"
-"\\(hide\\|show\\)StaffSwitch"
-"\\(lower\\|upper\\)Voice"
-"voice\\(One\\|Two\\|Three\\|Four\\|B\\|C\\|D\\|E\\)" ; voice*
-"paper\\(Eleven\\|Sixteen\\|Thirteen\\|TwentySix\\)" ; paper*
-"\\(lower\\|upper\\)\\(Octave\\|One\\)" ; (lower/upper)*
-"hairyChord" "\\(Piano\\|Rhythmic\\)\\(Staff\\)?"
-"\\(clarinetti\\|fagotti\\|flauti\\|melodic\\|oboi\\|\\(quite\\|rather\\|somewhat\\)LongLyrics\\|violinoII?\\)?\\(Staff\\)?" ; *Staff
-"\\(archi\\|bassi\\|legni\\|ottoni\\|timpani\\|viole\\|violini\\)\\(Group\\)" ; *Group
-"melisma\\(End\\)?" "staff\\(One\\|Two\\)?" "rests\\(II\\)?" "specialKey"
-"noBreak" "paperTwentysix" "endHorizScript" "FontBody" "text(I)+"
-"\\(modern\\|forget\\)Accidental" ; *Accidentals
-"noResetKey" "modern\\(Voice\\)?Cautionaries" "unaCorda" "treCorde"
-
-                      ))
-
-  (reservedwords '(
-
-;; Other words which look nicer when colored
-"Accidental" "autoBeamSettings" "BarLine" "Beam"
-"ChordName\\([s]?\\|s.[a-zA-Z]*\\)" "Dots" "DynamicText"
-"FiguredBass" "Hairpin" "\\(\\(Inner\\)?Choir\\|Grand\\|Piano\\|Tab\\)Staff"
-"Slur" "Stem" "SpacingSpanner" "System\\(StartDelimiter\\)?"
-"\\(Grace\\|Lyrics\\|Note\\(Head\\|Names\\)\\|Score\\|\\(Rhythmic\\)?Staff\\(Symbol\\)?\\|Thread\\|Voice\\)\\(.[a-zA-Z]*\\)?" ; combine below, if possible
-"\\(Grace\\|Lyrics\\|Note\\(Head\\|Names\\)\\|Score\\|\\(Rhythmic\\)?Staff\\(Symbol\\)?\\|Thread\\|Voice\\)[ \t]*\\(.[ \t]*[a-zA-Z]*\\)?" 
-"TextScript" "TimeSignature" "VerticalAlignment"
-
-		      ))
-
-       (kwregex (mapconcat (lambda (x) (concat "\\\\" x))  keywords "\\|"))
-       (iregex (mapconcat (lambda (x) (concat "\\\\" x))  identifiers "\\|"))
-       (rwregex (mapconcat (lambda (x) (concat "" x))  reservedwords "\\|"))
+  (let* ((kwregex (mapconcat (lambda (x) (concat "\\" x))  LilyPond-keywords "\\|"))
+	 (iregex (mapconcat (lambda (x) (concat "\\" x))  LilyPond-identifiers "\\|"))
+	 (rwregex (mapconcat (lambda (x) (concat "" x))  LilyPond-reserved-words "\\|"))
 )
 
     (list 
diff -purN ../lilypond-1.7.8/lilypond-init.el ./lilypond-init.el
--- ../lilypond-1.7.8/lilypond-init.el	2001-07-24 13:39:46.000000000 +0200
+++ ./lilypond-init.el	2002-11-29 19:58:40.000000000 +0100
@@ -1,11 +1,20 @@
 ;;; lilypond-init.el --- Startup code for LilyPond mode
-;;;
-;;; Add this to your ~/.emacs or ~/.emacs.el, or
-;;; install this file into Emacs' site-start.d
+;;
+;; Instructions, extracted from Documentation/topdocs/INSTALL.texi: 
 
-(autoload 'LilyPond-mode "lilypond-mode")
-(setq auto-mode-alist
-      (cons '("\\.ly$" . LilyPond-mode) auto-mode-alist))
+;; Emacs mode for entering music and running LilyPond is contained in
+;; the source archive as `lilypond-mode.el', `lilypond-indent.el',
+;; `lilypond-font-lock.el' and `lilypond.words'. You should install 
+;; these files to a directory included in your `load-path'. 
+;; File `lilypond-init.el' should be placed to `load-path/site-start.d/' 
+;; or appended to your `~/.emacs' or `~/.emacs.el'. 
 
+;; As a user, you may want add your source path or, e.g., `~/site-lisp/' to
+;; your `load-path'. Append the following line (modified) to your `~/.emacs':
+
+;(setq load-path (append (list (expand-file-name "~/site-lisp")) load-path))
+
+(autoload 'LilyPond-mode "lilypond-mode" "LilyPond Editing Mode" t)
+(add-to-list 'auto-mode-alist '("\\.ly$" . LilyPond-mode))
 (add-hook 'LilyPond-mode-hook (lambda () (turn-on-font-lock)))
 
diff -purN ../lilypond-1.7.8/lilypond-mode.el ./lilypond-mode.el
--- ../lilypond-1.7.8/lilypond-mode.el	2002-11-12 11:47:54.000000000 +0100
+++ ./lilypond-mode.el	2002-11-29 19:58:40.000000000 +0100
@@ -5,30 +5,24 @@
 ;;;  
 ;;; (c) 1999--2001 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; 
-;;; Changed 2001 Heikki Junes <heikki.junes@hut.fi>
+;;; Changed 2001--2002 Heikki Junes <heikki.junes@hut.fi>
 ;;;    * Add PS-compilation, PS-viewing and MIDI-play (29th Aug 2001)
 ;;;    * Keyboard shortcuts (12th Sep 2001)
 ;;;    * Inserting tags, inspired on sgml-mode (11th Oct 2001)
+;;;    * Autocompletion & Info (23rd Nov 2002)
 ;;;
 ;;; Changed 2002 Carlos Betancourt <carlos.betancourt@chello.be>
 ;;;    * Added spanish-note-replacements
 
 ;;; Inspired on auctex
 
-;;;
-;;; Add this to your ~/.emacs or ~/.emacs.el
-;;;     (load-library "lilypond-mode.el")
-;;;     (setq auto-mode-alist
-;;;      (cons '("\\.ly$" . LilyPond-mode) auto-mode-alist))
-;;; 
-
-(load-library "lilypond-font-lock")
-(load-library "lilypond-indent")
+;;; Look lilypond-init.el or Documentation/topdocs/INSTALL.texi
+;;; for installing instructions.
 
 (require 'easymenu)
 (require 'compile)
 
-(defconst LilyPond-version "1.7.6"
+(defconst LilyPond-version "1.7.8"
   "`LilyPond-mode' version number.")
 
 (defconst LilyPond-help-address "bug-lilypond@gnu.org"
@@ -52,6 +46,73 @@
   :type 'string
   :group 'LilyPond)
 
+(defun LilyPond-words-filename ()
+  "The file containing LilyPond \keywords \Identifiers and ReservedWords.
+Finds file lilypond-words from load-path."
+  (let ((fn nil)
+	(lp load-path)
+	(words-file "lilypond.words"))
+    (while (and (> (length lp) 0) (not fn))
+      (setq fn (concat (car lp) "/" words-file))
+      (if (not (file-readable-p fn)) 
+	  (progn (setq fn nil) (setq lp (cdr lp)))))
+    fn))
+
+(defun LilyPond-add-dictionary-word (x)
+  "Contains all words: keywords, identifiers, reserved words."
+  (nconc '(("" . 1)) x))
+
+; creates dictionary if empty
+(if (eq (length (LilyPond-add-dictionary-word ())) 1)
+    (progn
+      (setq fn (LilyPond-words-filename))
+      (setq b (find-file-noselect fn t t))
+      (setq m (set-marker (make-marker) 1 (get-buffer b)))
+      (setq i 1)
+      (while (> (buffer-size b) (marker-position m))
+	(setq i (+ i 1))
+	(setq copy (copy-alist (list (eval (symbol-name (read m))))))
+	(setcdr copy i)
+	(LilyPond-add-dictionary-word (list copy)))
+      (kill-buffer b)))
+
+(defconst LilyPond-keywords 
+  (let ((wordlist ())
+	(co (all-completions "" (LilyPond-add-dictionary-word ()))))
+    (progn
+      (while (> (length co) 0)
+	(if (> (length (car co)) 1)
+	    (if (and (string-equal "\\" (substring (car co) 0 1))
+		     (string-equal (downcase (car co)) (car co)))
+		(add-to-list 'wordlist (car co))))
+	(setq co (cdr co)))
+      wordlist))
+  "LilyPond \\keywords")
+
+(defconst LilyPond-identifiers 
+  (let ((wordlist ())
+	(co (all-completions "" (LilyPond-add-dictionary-word ()))))
+    (progn
+      (while (> (length co) 0)
+	(if (> (length (car co)) 1)
+	    (if (and (string-equal "\\" (substring (car co) 0 1))
+		     (not (string-equal (downcase (car co)) (car co))))
+		(add-to-list 'wordlist (car co))))
+	(setq co (cdr co)))
+      wordlist))
+  "LilyPond \\Identifiers")
+
+(defconst LilyPond-reserved-words 
+  (let ((wordlist ())
+	(co (all-completions "" (LilyPond-add-dictionary-word ()))))
+    (progn
+      (while (> (length co) 0)
+	(if (> (length (car co)) 0)
+	    (if (not (string-equal "\\" (substring (car co) 0 1)))
+		(add-to-list 'wordlist (car co))))
+	(setq co (cdr co)))
+      wordlist))
+  "LilyPond ReservedWords")
 
 (defun LilyPond-check-files (derived originals extensions)
   "Check that DERIVED is newer than any of the ORIGINALS.
@@ -220,7 +281,7 @@ LilyPond-expand-list.
     ("%t" . ".tex")
     ("%d" . ".dvi")
     ("%p" . ".ps")
-    ("%l" . ".latex")
+    ("%l" . ".tex")
     ("%x" . ".tely")
     ("%m" . ".midi")
     )
@@ -527,6 +588,8 @@ command."
   (define-key LilyPond-mode-map ")" 'LilyPond-electric-close-paren)
   (define-key LilyPond-mode-map ">" 'LilyPond-electric-close-paren)
   (define-key LilyPond-mode-map "}" 'LilyPond-electric-close-paren)
+  (define-key LilyPond-mode-map [S-iso-lefttab] 'LilyPond-autocompletion)
+  (define-key LilyPond-mode-map "\C-c\t" 'LilyPond-info-index-search)
   )
 
 ;;; Menu Support
@@ -628,33 +691,141 @@ command."
 	     (message "Remember to add all other details as well.") (sit-for 5 0 1)))
     )))
 
-(define-skeleton LilyPond-insert-tag-notes
+(defun LilyPond-pre-word-search ()
+  "Fetch the alphabetic characters and \\ in front of the cursor."
+  (interactive)
+  (let ((pre "")
+	(prelen 0)
+	(ch (char-before (- (point) 0))))
+    (while (and ch (or (and (>= ch 65) (<= ch 90)) ; not bolp, A-Z
+		       (and (>= ch 97) (<= ch 122)) ; a-z
+		       (= ch 92))) ; \\
+      (setq pre (concat (char-to-string ch) pre))
+      (setq prelen (+ prelen 1))
+      (setq ch (char-before (- (point) prelen))))
+    pre))
+
+(defun LilyPond-post-word-search ()
+  "Fetch the alphabetic characters behind the cursor."
+  (interactive)
+  (let ((post "")
+	(postlen 0)
+	(ch (char-after (+ (point) 0))))
+    (while (and ch (or (and (>= ch 65) (<= ch 90)) ; not eolp, A-Z
+		       (and (>= ch 97) (<= ch 122)))) ; a-z
+      (setq post (concat post (char-to-string ch)))
+      (setq postlen (+ postlen 1))
+      (setq ch (char-after (+ (point) postlen))))
+    post))
+
+(defun LilyPond-autocompletion ()
+  "Show completions in mini-buffer for the given word."
+  (interactive)
+  (let ((pre (LilyPond-pre-word-search))
+	(post (LilyPond-post-word-search))
+	(compsstr ""))
+  ; insert try-completion and show all-completions
+    (if (> (length pre) 0)
+	(progn
+	  (setq trycomp (try-completion pre (LilyPond-add-dictionary-word ())))
+	  (if (char-or-string-p trycomp)
+	      (if (string-equal (concat pre post) trycomp)
+		  (goto-char (+ (point) (length post)))
+		(progn
+		  (delete-region (point) (+ (point) (length post)))
+		  (insert (substring trycomp (length pre) nil))))
+	    (progn
+	      (delete-region (point) (+ (point) (length post)))
+	      (font-lock-fontify-buffer))) ; only inserting fontifies
+	
+	(setq complist (all-completions pre (LilyPond-add-dictionary-word ())))
+	(while (> (length complist) 0)
+	  (setq compsstr (concat compsstr "\"" (car complist) "\" "))
+	  (setq complist (cdr complist)))
+	(message compsstr) 
+	(sit-for 0 100 1)))))
+
+(defun LilyPond-info ()
+  "Launch Info for lilypond."
+  (interactive)
+  (info "lilypond"))
+  
+(defun LilyPond-music-glossary-info ()
+  "Launch Info for music-glossary."
+  (interactive)
+  (info "music-glossary"))
+(defun LilyPond-internals-info ()
+  "Launch Info for lilypond-internals."
+  (interactive)
+  (info "lilypond-internals"))
+  
+(defun LilyPond-info-index-search ()
+  "Inside Emacs, launch `info lilypond --index-search word-under-cursor'"
+  (interactive)
+  (let ((str (concat (LilyPond-pre-word-search) (LilyPond-post-word-search))))
+    (if (and (> (length str) 0) 
+	     (string-equal (substring str 0 1) "\\"))
+	(setq str (substring str 1 nil)))
+    (LilyPond-info)
+    (Info-index str)))
+
+(defun LilyPond-insert-string (pre)
+  "Insert text to the buffer."
+  (interactive)
+  (insert pre)
+  (length pre))
+
+(defun LilyPond-insert-between (text pre post)
+  "Insert text to the buffer if non-empty string is given."
+  (interactive)
+  (let ((str (read-string text)))
+    (if (string-equal str "")
+	0
+      (progn (setq pre_str_post (concat pre str post))
+	     (insert pre_str_post)
+	     (length pre_str_post)))))
+
+(defun LilyPond-insert-tag-notes ()
   "LilyPond notes tag."
-  nil
-;  (if (bolp) nil ?\n)
-  "\\notes"
-  (if (y-or-n-p "Set \"\\relative\" attribute? ")
-      (concat " \\relative " (skeleton-read "Relative: " "" str)))
-  " { " _ " }")
+  (interactive)
+  (setq begin (if (and transient-mark-mode mark-active) 
+		  (mark-marker) (point-marker)))
+  (setq end (point-marker))
+  (goto-char begin)
+  (setq l1 (LilyPond-insert-string "\\notes "))
+  (setq l2 (LilyPond-insert-between "Relative (e.g. c'): " "\\relative " " "))
+  (if (eq l2 0)
+      (setq l2 (LilyPond-insert-between "Transpose (e.g. c c'): " "\\transpose " " ")))
+  (setq l3 (LilyPond-insert-string "{ "))
+  (goto-char (+ end l1 l2 l3))
+  (LilyPond-insert-string " }")
+  (goto-char (+ end l1 l2 l3)))
 
-(define-skeleton LilyPond-insert-tag-score
+(defun LilyPond-insert-tag-score ()
   "LilyPond score tag."
-  nil
-  (if (bolp) nil ?\n)
-  "\\score {\n"
-  "   " _ "\n"
-  "   \\paper {  }\n"
-  (if (y-or-n-p "Insert \"\\header\" field? ")
-      (concat "   \\header {\n      " 
-	      (skeleton-read "Piece: " "piece = " str) "\n"
-	      (if (y-or-n-p "Insert \"opus\" field? ")
-		  (concat "      " (skeleton-read "Opus: " "opus = " str) "\n"))
-	      "   }\n"))
-  (if (y-or-n-p "Insert \"\\midi\" field? ")
-      (concat "   \\midi { " 
-	      (skeleton-read "Midi: " "\\tempo 4 = " str)  
-	      " }\n"))
-  "}\n")
+  (interactive)
+  (setq begin (if (and transient-mark-mode mark-active) 
+		  (mark-marker) (point-marker)))
+  (setq end (point-marker))
+  (goto-char begin)
+  (setq l1 (LilyPond-insert-string "\\score {\n    ")) ; keep track of lengths
+  (goto-char (+ end l1))
+  (LilyPond-insert-string "\n    \\paper { }\n")
+  (setq l2 (if (y-or-n-p "Insert \"\\header\" field? ")
+	       (+ (LilyPond-insert-string "    \\header {")
+		  (LilyPond-insert-between "Title: " "\n      title = \"" "\"")
+		  (LilyPond-insert-between "Subtitle: " "\n      subtitle = \"" "\"")
+		  (LilyPond-insert-between "Piece: " "\n      piece = \"" "\"")
+		  (LilyPond-insert-between "Opus: "  "\n      opus = \"" "\"")
+		  (LilyPond-insert-string "\n    }\n"))
+	     0))
+  (setq l3 (if (y-or-n-p "Insert \"\\midi\" field? ")
+	       (+ (LilyPond-insert-string "    \\midi {")
+		  (LilyPond-insert-between "Tempo: " " \\tempo (e.g. 4 = 60)" "")
+		  (LilyPond-insert-string " }\n"))
+	     0))
+  (setq l4 (LilyPond-insert-string "}\n"))
+  (goto-char (+ end l1)))
 
 (defun LilyPond-command-menu-entry (entry)
   ;; Return LilyPond-command-alist ENTRY as a menu item.
@@ -671,8 +842,8 @@ command."
 
 
 (easy-menu-define LilyPond-command-menu
-    LilyPond-mode-map
-    "Menu used in LilyPond mode."
+  LilyPond-mode-map
+  "Menu used in LilyPond mode."
   (append '("Command")
 	  '(("Command on"
 	     [ "Master File" LilyPond-command-select-master
@@ -687,18 +858,18 @@ command."
 ;	  (let ((file 'LilyPond-command-on-current))
 ;	    (mapcar 'LilyPond-command-menu-entry LilyPond-command-alist))
 ;;; Some kind of mapping which includes :keys might be more elegant
-	  '([ "LilyPond" (LilyPond-command (LilyPond-command-menu "LilyPond") 'LilyPond-master-file) :keys "C-c C-l"])
+	  '([ "LilyPond" LilyPond-command-lilypond t])
 	  '([ "TeX" (LilyPond-command (LilyPond-command-menu "TeX") 'LilyPond-master-file) ])
-	  '([ "2Dvi" (LilyPond-command (LilyPond-command-menu "2Dvi") 'LilyPond-master-file) :keys "C-c C-d"])
-	  '([ "2PS" (LilyPond-command (LilyPond-command-menu "2PS") 'LilyPond-master-file) :keys "C-c C-f"])
+	  '([ "2Dvi" LilyPond-command-formatdvi t])
+	  '([ "2PS" LilyPond-command-formatps t])
 	  '([ "2Midi" (LilyPond-command (LilyPond-command-menu "2Midi") 'LilyPond-master-file)])
 	  '([ "Book" (LilyPond-command (LilyPond-command-menu "Book") 'LilyPond-master-file) ])
 	  '([ "LaTeX" (LilyPond-command (LilyPond-command-menu "LaTeX") 'LilyPond-master-file) ])
-	  '([ "SmartView" (LilyPond-command (LilyPond-command-menu "SmartView") 'LilyPond-master-file) :keys "C-c C-s"])
-	  '([ "View" (LilyPond-command (LilyPond-command-menu "View") 'LilyPond-master-file) :keys "C-c C-v"])
-	  '([ "ViewPS" (LilyPond-command (LilyPond-command-menu "ViewPS") 'LilyPond-master-file) :keys "C-c C-p"])
-	  '([ "Midi (off)" (LilyPond-command-next-midi) :keys "C-c C-m"])
-	  '([ "Midi all" (LilyPond-command-all-midi)])
+	  '([ "SmartView" LilyPond-command-smartview t])
+	  '([ "View" LilyPond-command-view t])
+	  '([ "ViewPS" LilyPond-command-viewps t])
+	  '([ "Midi (off)" LilyPond-command-next-midi t])
+	  '([ "Midi all" LilyPond-command-all-midi t])
 	  ))
 
 (easy-menu-define LilyPond-mode-menu
@@ -709,15 +880,22 @@ command."
 	     [ "\\notes..."  LilyPond-insert-tag-notes t]
 	     [ "\\score..."  LilyPond-insert-tag-score t]
 	     ["Quick Notes"  LilyPond-quick-note-insert t]
+	     ["Autocompletion"   LilyPond-autocompletion t]
 	     ))
 	  '(("Miscellaneous"
 	     ["Uncomment Region" LilyPond-un-comment-region t]
 	     ["Comment Region" comment-region t]
 	     ["Refontify buffer" font-lock-fontify-buffer t]
  	     ))
+	  '(("Info"
+	     ["LilyPond" LilyPond-info t]
+	     ["LilyPond index-search" LilyPond-info-index-search t]
+	     ["Music Glossary" LilyPond-music-glossary-info t]
+	     ["LilyPond internals" LilyPond-internals-info t]
+	     ))
 	  ))
 
-(defconst LilyPond-imenu-generic-re "^\\([a-zA-Z_][a-zA-Z0-9_]*\\) *="
+(defconst LilyPond-imenu-generic-re "^\\([a-zA-Z]+\\) *="
   "Regexp matching Identifier definitions.")
 
 (defvar LilyPond-imenu-generic-expression
@@ -815,6 +993,9 @@ LilyPond-xdvi-command\t\tcommand to disp
   (interactive)
   (message "Using `LilyPond-mode' version %s" LilyPond-version))
 
+(load-library "lilypond-font-lock")
+(load-library "lilypond-indent")
+
 (provide 'lilypond-mode)
 ;;; lilypond-mode.el ends here
 
diff -purN ../lilypond-1.7.8/lilypond.words ./lilypond.words
--- ../lilypond-1.7.8/lilypond.words	1970-01-01 01:00:00.000000000 +0100
+++ ./lilypond.words	2002-11-29 19:58:40.000000000 +0100
@@ -0,0 +1,438 @@
+\\accent
+\\accepts
+Accidental 
+\\accompany
+\\addlyrics
+\\aeolian
+\\alias
+\\alternative
+alto
+\\apply
+\\archiGroup
+\\arpeggio
+\\autoBeamOff
+\\autoBeamOn
+autoBeamSettings 
+\\autochange
+\\bar
+baritone
+BarLine 
+\\BarNumberingContext
+bass
+\\bassiGroup
+\\bcincipit
+Beam
+\\beamintervals
+\\blend
+\\break
+\\breathe
+\\broken
+\\cadenzaOff
+\\cadenzaOn
+\\cg
+\\ch
+\\char
+ChoirStaff
+\\ChoirStaffContext
+\\chord
+\\chordchordmodifiers
+\\chordmodifiers
+ChordName
+ChordName
+\\ChordNamesContext
+\\chords
+\\chordstest
+\\clarinetti
+\\clarinettiStaff
+\\clef
+\\clipping
+\\cm
+\\coda
+\\commandspanrequest
+\\complex
+\\consists
+\\consistsend
+\\context
+\\contrabasso
+\\cr
+\\cresc
+\\CueVoiceContext
+\\decr
+\\default
+\\denies
+\\different
+\\dirs
+\\dorian
+Dots
+\\dotsBoth
+\\dotsDown
+\\dotsUp
+\\down
+\\downbow
+\\downmordent
+\\downprall
+\\duration
+\\dynamicBoth
+\\dynamicDown
+DynamicText
+\\dynamicUp
+\\EasyNotation
+\\eccentric
+\\eg
+\\elementdescriptions
+\\embeddedps
+\\emptyText
+\\endcresc
+\\endHorizScript
+\\endincipit
+\\ex
+\\extreme
+\\f
+F
+\\fagotti
+\\fagottiStaff
+\\fatText
+\\fermata
+\\ff
+\\fff
+\\ffff
+FiguredBass
+\\FiguredBassContext
+\\figures
+\\flageolet
+\\flauti
+\\flautiStaff
+fold
+\\font
+\\FontBody
+\\forgetAccidental
+\\fp
+\\fragment
+\\fz
+G
+\\gg
+\\gliss
+\\glissando
+\\gmsus
+\\grace
+Grace
+\\GraceContext
+\\grandstaff
+GrandStaff
+\\GrandStaffContext
+\\grstaff
+Hairpin
+\\hairyChord
+\\HaraKiriStaffContext
+\\header
+\\hideStaffSwitch
+\\hsize
+\\improOff
+\\improOn
+\\include
+InnerChoirStaff
+\\InnerChoirStaffContext
+\\InnerStaffContainerContext
+\\InnerStaffContext
+\\InnerStaffGroupContext
+\\inversions
+\\invisible
+\\ionian
+\\key
+\\keys
+\\keysignature
+\\lag
+\\legato
+\\legniGroup
+\\lheel
+\\linebreak
+\\lineprall
+\\locrian
+\\longa
+\\lower
+\\lowerOctave
+\\lowerOne
+\\lowerVoice
+\\ltoe
+\\lydian
+\\lyrics
+Lyrics
+\\LyricsContext
+\\LyricsVoiceContext
+\\major
+\\marcato
+\\mark
+\\maxima
+\\melisma
+\\melisma
+\\melismaEnd
+\\melodic
+\\melodicStaff
+\\melody
+mezzosoprano
+\\mf
+\\midi
+\\minor
+\\mixolydian
+\\mm
+\\mm
+\\modernAccidental
+\\modernCautionaries
+\\modernVoiceCautionaries
+\\monstrous
+\\mp
+\\multipart
+\\music
+\\musicalpitch
+\\n
+\\name
+\\names
+\\newpage
+\\noBreak
+\\noise
+\\noisebeat
+\\noResetKey
+\\normalkey
+\\normalsize
+NoteHead
+\\notenames
+NoteNames
+\\NoteNamesContext
+\\notes
+\\nt
+\\oboi
+\\oboiStaff
+\\one
+\\onestaff
+\\open
+\\OrchestralPartStaffContext
+\\OrchestralScoreContext
+\\ottoniGroup
+\\outputproperty
+\\over
+\\override
+\\p
+\\paper
+\\paperEleven
+\\paperSixteen
+\\paperThirteen
+\\paperTwentysix
+\\paperTwentySix
+\\part
+\\partcombine
+\\partial
+\\pbow
+\\penalty
+percent
+\\phrygian
+\\Piano
+PianoStaff
+\\PianoStaff
+\\PianoStaffContext
+\\pitch
+\\pitchnames
+\\portato
+\\pp
+\\pper
+\\ppp
+\\pprall
+\\prall
+\\pralldown
+\\prallmordent
+\\prallprall
+\\prallup
+\\property
+\\pt
+\\quickmeasure
+\\quiteLongLyrics
+\\quiteLongLyricsStaff
+\\ratherLongLyrics
+\\ratherLongLyricsStaff
+\\rc
+\\rced
+\\relative
+\\remove
+\\repeat
+\\rest
+\\rests
+\\restsII
+\\reverseturn
+\\revert
+\\rf
+\\rfz
+\\rheel
+\\rhythm
+RhythmicStaff
+\\RhythmicStaffContext
+\\Rhytmic
+\\RhytmicStaff
+\\right
+\\rtoe
+\\scale
+\\scales
+\\scheme
+\\score
+Score
+\\ScoreContext
+\\scpaper
+\\script
+\\scriptBoth
+\\scriptDown
+\\scriptUp
+\\scscore
+\\sd
+\\segno
+\\sequential
+\\set
+\\settings
+\\sf
+\\sff
+\\sfff
+\\sffff
+\\sfz
+\\shiftI
+\\shiftII
+\\shiftIII
+\\shiftIV
+\\shiftOff
+\\shiftOn
+\\shiftOnn
+\\shiftOnnn
+\\shiftV
+\\shortlong
+\\showStaffSwitch
+\\simultaneous
+\\singlepart
+\\skip
+Slur
+\\slurBoth
+\\slurDotted
+\\slurDown
+\\slurSolid
+\\slurUp
+\\small
+\\smarttranspose
+\\somewhatLongLyrics
+\\somewhatLongLyricsStaff
+soprano
+\\sostenutoBoth
+\\sostenutoDown
+\\sostenutoUp
+\\sp
+SpacingSpanner
+\\spanrequest
+\\specialKey
+\\spp
+\\sppp
+\\spppp
+\\staccatissimo
+\\staccato
+Staff
+\\StaffContainerContext
+\\StaffContext
+\\StaffGroupContext
+\\staffheight
+\\staffOne
+\\staffspace
+StaffSymbol
+\\staffTwo
+\\start
+Stem
+\\stemBoth
+\\stemDown
+\\steminvert
+\\stemUp
+\\stop
+\\stopped
+\\stpaper
+\\stscore
+\\stuff
+\\su
+\\sustainBoth
+\\sustainDown
+\\sustainUp
+System
+SystemStartDelimiter
+\\tab
+TabStaff
+\\tempo
+tenor
+\\tenuto
+\\textI
+\\textII
+\\textIII
+\\textscript
+TextScript 
+\\thenotes
+\\thrd
+\\ThreadContext
+\\threevoice
+\\thumb
+\\tieBoth
+\\tieDotted
+\\tieDown
+\\tieSolid
+\\tieUp
+\\tiltdown
+\\tiltup
+\\timb
+\\time
+\\times
+TimeSignature 
+\\timpaniGroup
+\\tiny
+\\toeters
+\\touch
+\\translator
+\\transpose
+treble
+\\treCorde
+\\treCordeBoth
+\\treCordeDown
+\\treCordeUp
+tremolo
+\\trill
+\\tupletBoth
+\\tupletDown
+\\tupletUp
+\\turn
+\\turnOff
+\\turnOn
+\\twovoicesteminvert
+\\type
+\\unaCorda
+\\unaCordaBoth
+\\unaCordaDown
+\\unaCordaUp
+\\under
+unfold
+\\unset
+\\upmordent
+\\upperOctave
+\\upperOne
+\\upperVoice
+\\version
+VerticalAlignment
+\\viloinII
+\\viloinIIStaff
+\\violeGroup
+violin
+\\violinI
+\\violiniGroup
+\\violinIStaff
+\\visible
+Voice
+\\voiceB
+\\voiceC
+\\VoiceContext
+\\voiceD
+\\voicedefault
+\\voiceE
+\\voiceFour
+\\voiceOne
+\\voicesteminvert
+\\voiceThree
+\\voiceTwo
+volta
+\\vsize
+\\x
diff -purN ../lilypond-1.7.8/ly/declarations-init.ly ./ly/declarations-init.ly
--- ../lilypond-1.7.8/ly/declarations-init.ly	2002-10-28 01:26:28.000000000 +0100
+++ ./ly/declarations-init.ly	2002-11-29 19:58:46.000000000 +0100
@@ -59,7 +59,7 @@ paperfile = \papersize + "-init.ly"
 
 
 % reset default duration
-unusedEntry = \notes { c4 }	
+unusedEntry = \notes { c4 }
 
 % music = "\melodic\relative c"
 
diff -purN ../lilypond-1.7.8/ly/engraver-init.ly ./ly/engraver-init.ly
--- ../lilypond-1.7.8/ly/engraver-init.ly	2002-11-13 01:40:22.000000000 +0100
+++ ./ly/engraver-init.ly	2002-11-29 19:58:46.000000000 +0100
@@ -251,7 +251,7 @@ StaffGroupContext = \translator {
 LyricsVoiceContext= \translator{
 	\type "Engraver_group_engraver"
 	\consistsend "Axis_group_engraver"
-	minimumVerticalExtent = #(cons -1.2 1.2)
+	minimumVerticalExtent = #'(-1.2 . 1.2)
 	extraVerticalExtent = ##f
 	verticalExtent = ##f 
 	\name LyricsVoice 
@@ -281,8 +281,9 @@ NoteNamesContext = \translator {
 LyricsContext = \translator {
 	\type "Engraver_group_engraver"
 	\name Lyrics
-	\consists Vertical_align_engraver %need this for getting folded repeats right.
-
+	
+	%% To get folded repeats right.
+	\consists Vertical_align_engraver 
 
 	\consistsend "Axis_group_engraver"
 	minimumVerticalExtent = ##f
@@ -388,9 +389,8 @@ ScoreContext = \translator {
 	systemStartDelimiter =#'SystemStartBar
 
 
-	%  name, glyph id, clef position 
-	% where is c0 in this clef?
-
+	%% name, glyph id, clef position 
+	%% where is c0 in this clef?
 	clefGlyph = #"clefs-G"
 	clefPosition = #-2
 	centralCPosition = #-6
@@ -412,8 +412,10 @@ ScoreContext = \translator {
 	pedalSustainStrings = #'("Ped." "*Ped." "*")
 	pedalUnaCordaStrings = #'("una corda" "" "tre corde")
 
-	%% these are in ordinary italic font, including the *, but they are unlikely to be used, 
-	%% as the default pedal-style for SostenutoPedal is 'mixed': i.e.  Sost. Ped_____________________ 
+	%% These are in ordinary italic font, including the *,
+	%% but they are unlikely to be used, 
+	%% as the default pedal-style for SostenutoPedal is 'mixed':
+	%% i.e.  Sost. Ped_____________________ 
 	pedalSostenutoStrings = #'("Sost. Ped." "*Sost. Ped." "*") 
 
 	tupletNumberFormatFunction = #denominator-tuplet-formatter
diff -purN ../lilypond-1.7.8/ly/generate-documentation.ly ./ly/generate-documentation.ly
--- ../lilypond-1.7.8/ly/generate-documentation.ly	2002-10-21 00:44:16.000000000 +0200
+++ ./ly/generate-documentation.ly	2002-11-29 19:58:46.000000000 +0100
@@ -3,5 +3,5 @@
 %
 % Running LilyPond on this file generates the documentation
 %
-#(ly:set-parse-protect #f)
+#(ly:set-option 'parse-protect #f)
 #(load-from-path "generate-documentation.scm")
diff -purN ../lilypond-1.7.8/make/lilypond.mandrake.spec.in ./make/lilypond.mandrake.spec.in
--- ../lilypond-1.7.8/make/lilypond.mandrake.spec.in	2002-11-04 11:53:22.000000000 +0100
+++ ./make/lilypond.mandrake.spec.in	2002-12-01 17:01:38.000000000 +0100
@@ -2,7 +2,7 @@
 
 %define name lilypond
 %define version @TOPLEVEL_VERSION@
-%define release 1mdk
+%define release 4mdk
 
 Summary:	A program for printing sheet music.
 Name:		%{name}
@@ -12,12 +12,9 @@ License:	GPL
 Group:		Applications/Publishing
 URL:		http://www.lilypond.org/
 Source0:	ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-%{version}.tar.gz
-# Source1:	%name-16x16.png.tar.bz2
-# Source2:	%name-32x32.png.tar.bz2
-# Source3:	%name-48x48.png.tar.bz2
 BuildRoot:	%{_tmppath}/%{name}-buildroot
 BuildRequires:	t1utils bison texinfo
-Requires:	tetex tetex-latex
+Requires:	tetex tetex-latex chkfontpath XFree86 info-install
 
 %description
 LilyPond is a music typesetter.  It produces beautiful sheet music using a
@@ -79,7 +76,7 @@ make prefix="$RPM_BUILD_ROOT%{_prefix}" 
 %endif
 
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d
-install -m 644 lilypond-mode.el lilypond-font-lock.el lilypond-indent.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/
+install -m 644 lilypond-mode.el lilypond-font-lock.el lilypond-indent.el lilypond.words $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/
 install -m 644 lilypond-init.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d
 
 bzip2 $RPM_BUILD_ROOT%{_mandir}/man1/*
@@ -97,23 +94,23 @@ tar -C web -xzf out/web.tar.gz 
 # Every entry must be changed according package specifications
 # Pay attention to "section" "command" and "longtitle"
 
-# mkdir -p $RPM_BUILD_ROOT%{_menudir}
-# cat >$RPM_BUILD_ROOT%{_menudir}/%{name} <<EOF
-# ?package(%name): command="%{_bindir}/%{name}" needs="X11" \
-# icon="%{name}.png" section="Applications/Publishing" \
-# title="%{name}" longtitle="%{name}"
-# EOF
+mkdir -p $RPM_BUILD_ROOT%{_menudir}
+cat >$RPM_BUILD_ROOT%{_menudir}/%{name} <<EOF
+?package(%name): command="%{_bindir}/%{name}" needs="X11" \
+icon="%{name}.xpm" section="Applications/Publishing" \
+title="%{name}" longtitle="%{name}"
+EOF
   
 # icon
-# install -d $RPM_BUILD_ROOT/%{_miconsdir}
-# install -d $RPM_BUILD_ROOT/%{_iconsdir}
-# install -d $RPM_BUILD_ROOT/%{_liconsdir}
-# bzcat %{SOURCE1} > $RPM_BUILD_ROOT/%{_miconsdir}/%{name}.png
-# bzcat %{SOURCE2} > $RPM_BUILD_ROOT/%{_iconsdir}/%{name}.png
-# bzcat %{SOURCE3} > $RPM_BUILD_ROOT/%{_liconsdir}/%{name}.png
+install -d $RPM_BUILD_ROOT/%{_miconsdir}
+install -d $RPM_BUILD_ROOT/%{_iconsdir}
+install -d $RPM_BUILD_ROOT/%{_liconsdir}
+install -m 644 Documentation/pictures/%{name}-16x16.xpm $RPM_BUILD_ROOT/%{_miconsdir}/%{name}.xpm
+install -m 644 Documentation/pictures/%{name}-32x32.xpm $RPM_BUILD_ROOT/%{_iconsdir}/%{name}.xpm
+install -m 644 Documentation/pictures/%{name}-48x48.xpm $RPM_BUILD_ROOT/%{_liconsdir}/%{name}.xpm
 
 %post
-# %{update_menus}
+%{update_menus}
 
 touch /tmp/.lilypond-install
 rm `find /var/lib/texmf -name 'feta*pk' -or -name 'feta*tfm' -or -name 'parmesan*pk' -or -name 'parmesan*tfm' -print` /tmp/.lilypond-install
@@ -137,7 +134,7 @@ rm -f %{_datadir}/lilypond/%{version}/fo
 chkfontpath --remove=%{_datadir}/lilypond/%{version}/fonts/type1/
 
 %postun
-# %{clean_menus}
+%{clean_menus}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -146,9 +143,8 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(-, root, root)
 %doc COPYING README.txt INSTALL.txt DEDICATION NEWS AUTHORS.txt THANKS
 
-# is the following really started during startup of emacs?
 %{_datadir}/emacs/site-lisp/site-start.d/lilypond-*
-%{_datadir}/emacs/site-lisp/lilypond-*
+%{_datadir}/emacs/site-lisp/lilypond*
 
 %if %{info}
   %{_infodir}/*
@@ -159,25 +155,27 @@ rm -rf $RPM_BUILD_ROOT
 %{_prefix}/../etc/profile.d/lilypond.*
 %_bindir/*
 %_mandir/*
-# %_menudir/*
-# %_miconsdir/*
-# %_iconsdir/*
-# %_liconsdir/*
+%_menudir/*
+%_miconsdir/*
+%_iconsdir/*
+%_liconsdir/*
 
 %files documentation
+%defattr(-, root, root)
 
 %doc web/
 
 %changelog
+* Fri Nov 30 2002 Heikki Johannes Junes <hjunes@cc.hut.fi> 1.7.8-4mdk
+- add pre/post-dependencies and menus with icon from source.
+
 * Fri Oct 28 2002 Heikki Johannes Junes <hjunes@cc.hut.fi> 1.7.4-1mdk
 - info, commented menu
 
-%changelog
 * Fri Aug 30 2002 Heikki Johannes Junes <hjunes@cc.hut.fi> 1.6.0-1mdk
 - Adapted from lilypond.redhat.skel and skeleton found in Mandrake's RPM-docs.
 - TODO: info (?) and dependencies.
 
-%changelog
 * Fri Jun 01 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.4.2-1mdk
 - updated by Michael Brown <mbrown@linux-mandrake.com> :
 	- Upgraded to 1.4.2
diff -purN ../lilypond-1.7.8/make/lilypond.redhat.spec.in ./make/lilypond.redhat.spec.in
--- ../lilypond-1.7.8/make/lilypond.redhat.spec.in	2002-10-09 17:14:36.000000000 +0200
+++ ./make/lilypond.redhat.spec.in	2002-11-29 19:58:48.000000000 +0100
@@ -65,7 +65,7 @@ gzip -9fn $RPM_BUILD_ROOT%{_infodir}/*
 %endif
 
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d
-install -m 644 lilypond-mode.el lilypond-font-lock.el lilypond-indent.el $RPM_BUILD_ROOT/%{_datadir}/emacs/site-lisp/
+install -m 644 lilypond-mode.el lilypond-font-lock.el lilypond-indent.el lilypond.words $RPM_BUILD_ROOT/%{_datadir}/emacs/site-lisp/
 install -m 644 lilypond-init.el $RPM_BUILD_ROOT/%{_datadir}/emacs/site-lisp/site-start.d
 
 gzip -9fn $RPM_BUILD_ROOT%{_mandir}/man1/*
@@ -107,7 +107,7 @@ chkfontpath --remove=%{_datadir}/share/l
 
 %files
 %defattr(-, root, root)
-%{_datadir}/emacs/site-lisp/lilypond-*
+%{_datadir}/emacs/site-lisp/lilypond*
 %{_datadir}/emacs/site-lisp/site-start.d/lilypond-*
 
 %{_bindir}/abc2ly
@@ -143,6 +143,7 @@ chkfontpath --remove=%{_datadir}/share/l
 /etc/profile.d/lilypond.*
 
 %files documentation
+%defattr(-, root, root)
 
 %doc web/
 
diff -purN ../lilypond-1.7.8/make/lilypond.suse.spec.in ./make/lilypond.suse.spec.in
--- ../lilypond-1.7.8/make/lilypond.suse.spec.in	2002-09-20 11:21:08.000000000 +0200
+++ ./make/lilypond.suse.spec.in	2002-11-29 19:58:48.000000000 +0100
@@ -216,6 +216,8 @@ touch var/adm/SuSEconfig/run-texhash
 %doc lilypond-mode.el
 %doc lilypond-font-lock.el
 %doc lilypond-indent.el
+%doc lilypond-init.el
+%doc lilypond.words
 
 %config /etc/profile.d/*
 
@@ -259,6 +261,7 @@ touch var/adm/SuSEconfig/run-texhash
 #%{_prefix}/../etc/profile.d/lilypond.*
 
 %files doc
+%defattr(-, root, root)
 # this gets too messy...
 
 
diff -purN ../lilypond-1.7.8/mf/feta-beugel.mf ./mf/feta-beugel.mf
--- ../lilypond-1.7.8/mf/feta-beugel.mf	2002-08-09 11:54:59.000000000 +0200
+++ ./mf/feta-beugel.mf	2002-11-29 19:58:48.000000000 +0100
@@ -2,6 +2,9 @@ input feta-autometric;
 input feta-macros;
 input feta-params;
 
+font_coding_scheme "feta braces";
+
+
 fet_beginfont("feta-braces", 16);
 mode_setup;
 
diff -purN ../lilypond-1.7.8/mf/feta-nummer.mf ./mf/feta-nummer.mf
--- ../lilypond-1.7.8/mf/feta-nummer.mf	2002-04-25 23:54:16.000000000 +0200
+++ ./mf/feta-nummer.mf	2002-11-29 19:58:48.000000000 +0100
@@ -20,6 +20,7 @@ space# := design_size/2;
 
 font_x_height height#;
 font_normal_space space#;
+font_coding_scheme "feta number";
 
 
 %
diff -purN ../lilypond-1.7.8/mf/GNUmakefile ./mf/GNUmakefile
--- ../lilypond-1.7.8/mf/GNUmakefile	2002-11-04 11:53:23.000000000 +0100
+++ ./mf/GNUmakefile	2002-11-29 19:58:48.000000000 +0100
@@ -87,7 +87,7 @@ default: $(ALL_GEN_FILES)
 $(outdir)/%.afm  $(outdir)/%.enc  $(outdir)/%.tex $(outdir)/%.dep: $(outdir)/%.log $(outdir)/%.tfm
 	$(PYTHON) $(buildscript-dir)/mf-to-table.py --package=$(topdir) --outdir=$(outdir) --dep $(outdir)/$(<F:.log=.dep)  --afm $(outdir)/$(<F:.log=.afm)  --enc $(outdir)/$(<F:.log=.enc) --tex $(outdir)/$(<F:.log=.tex) --ly $(outdir)/$(<F:.log=list.ly) $<
 
-fontdir: $(addprefix $(outdir)/, lilypond.map lilypond.sfd fonts.scale fonts.dir)
+fontdir: $(addprefix $(outdir)/, lilypond.map lilypond.sfd private-fonts fonts.scale fonts.dir)
 
 ## Urg
 mapentry=$(1) $(shell fgrep FontName $(outdir)/$(1).afm | sed -e 's/FontName *//') <$(1).pfaX
@@ -115,6 +115,10 @@ $(outdir)/lilypond.sfd:
 #	cd $(outdir) && echo sketch $(FETA_MF_FILES:.mf=.pfa) | $(PYTHON) $(topdir)/buildscripts/make-font-dir.py  > $(@F)
 	cd $(outdir) && echo sketch *.pfa | $(PYTHON) $(topdir)/buildscripts/make-font-dir.py  > $(@F)
 
+# Sodipodi map file
+SODIPODI_FONTS = parmesan20 feta-braces0 feta-nummer10 feta20
+$(outdir)/private-fonts:
+	cd $(outdir) && echo sodipodi $(SODIPODI_FONTS:%=%.pfa) | $(PYTHON) $(topdir)/buildscripts/make-font-dir.py  > $(@F)
 
 local-clean:
 	rm -f mfplain.mem mfplain.log 
diff -purN ../lilypond-1.7.8/mf/parmesan-generic.mf ./mf/parmesan-generic.mf
--- ../lilypond-1.7.8/mf/parmesan-generic.mf	2002-03-11 01:49:52.000000000 +0100
+++ ./mf/parmesan-generic.mf	2002-11-29 19:58:48.000000000 +0100
@@ -1,3 +1,4 @@
+
 % -*-Fundamental-*-
 % parmesan-generic.mf --  implement generic stuff: include lots of files,
 % but don't set dims.
diff -purN ../lilypond-1.7.8/NEWS ./NEWS
--- ../lilypond-1.7.8/NEWS	2002-10-06 15:31:12.000000000 +0200
+++ ./NEWS	2002-12-01 19:27:02.000000000 +0100
@@ -6,6 +6,44 @@ LilyPond identifiers.
 
 * Music types cleaned up and Schemified.  
 
+* New syntax for chords:
+
+	<< PITCHES >>
+
+This is in addition to the < MUSICS > syntax for simultaneous music. Combined with this: uniform postfix syntax for articulations:
+
+	c8-[-( d8-]-) 
+
+for a beamed slurred pair of eighth notes.
+
+* Texts on multimeasure rests can be set by the user.
+
+* Zigzagged glissandi
+
+* XML music output.
+
+* Preliminary Sodipodi/SVG output
+
+* Cluster support. Syntax:
+
+	NOTE-\openCluster
+	..
+	NOTE-\closeCluster
+
+* Beat grouping indications. Syntax:
+
+	#(set-time-signature 7 8 '(3 2 2))
+
+* User code evaluation during interpreting. Syntax
+
+	\applycontext #SCHEME-FUNCTION
+
+* Nested horizontal brackets for music analysis.
+
+	NOTE-\groupOpen
+		..
+	NOTE-\groupClose
+
 New features in 1.6 since 1.4
 
 * Support for figured bass and tablature.
diff -purN ../lilypond-1.7.8/python/lilylib.py ./python/lilylib.py
--- ../lilypond-1.7.8/python/lilylib.py	2002-11-12 11:48:03.000000000 +0100
+++ ./python/lilylib.py	2002-11-29 19:58:49.000000000 +0100
@@ -120,10 +120,10 @@ def progress (s):
 	sys.stderr.write (s)
 
 def warning (s):
-	sys.stderr.write (__main__.program_name + ":" + _ ("warning: ") + s + '\n')
+	sys.stderr.write (__main__.program_name + ": " + _ ("warning: ") + s + '\n')
 
 def error (s):
-	sys.stderr.write (__main__.program_name + ":" + _ ("error: ") + s + '\n')
+	sys.stderr.write (__main__.program_name + ": " + _ ("error: ") + s + '\n')
 	
 def exit (i):
 	if __main__.verbose_p:
diff -purN ../lilypond-1.7.8/scm/bass-figure.scm ./scm/bass-figure.scm
--- ../lilypond-1.7.8/scm/bass-figure.scm	2002-10-21 00:44:16.000000000 +0200
+++ ./scm/bass-figure.scm	2002-12-01 17:01:38.000000000 +0100
@@ -5,8 +5,12 @@
 (define (brew-one-figure grob fig-music)
   "Brew a single column for a music figure"
   (let* (
-	 (mf (ly:get-font grob '( (font-family .  music)  )))
-	 (nf (ly:get-font grob '( (font-family .  number)  )))
+	 (mf (ly:get-font grob (cons  '((font-family . music))
+				      Font_interface::get_property_alist_chain
+				      )))
+	 (nf (ly:get-font grob
+			  (cons  '((font-family . number))
+				 Font_interface::get_property_alist_chain)))
 	 (mol (ly:make-molecule  '() '(0 . 0) '(0 . 1.0)))
 	 (fig  (ly:get-mus-property fig-music 'figure))
 	 (acc  (ly:get-mus-property fig-music 'alteration))
diff -purN ../lilypond-1.7.8/scm/c++.scm ./scm/c++.scm
--- ../lilypond-1.7.8/scm/c++.scm	2002-10-21 00:44:17.000000000 +0200
+++ ./scm/c++.scm	2002-12-01 19:27:12.000000000 +0100
@@ -31,7 +31,8 @@
   (or (number? x) (string? x)))
 
 (define-public (markup? x)
-  (or (string? x) (list? x)))
+  (or (string? x) (list? x)
+      (new-markup? x)))
 
 (define-public (scheme? x) #t)
 
diff -purN ../lilypond-1.7.8/scm/grob-description.scm ./scm/grob-description.scm
--- ../lilypond-1.7.8/scm/grob-description.scm	2002-11-19 12:48:06.000000000 +0100
+++ ./scm/grob-description.scm	2002-11-20 01:17:09.000000000 +0100
@@ -436,12 +436,6 @@
 	(meta . ((interfaces . (key-signature-interface  font-interface  break-aligned-interface item-interface ))))
 	))
 
-    (Ligature
-     . (
-	(molecule-callback . ,Ligature_bracket::brew_molecule)
-	(meta . ((interfaces . (ligature-interface))))
-	))
-
     (LigatureBracket
      . (
 	(ligature-primitive-callback . ,Note_head::brew_molecule)
diff -purN ../lilypond-1.7.8/scm/interface-description.scm ./scm/interface-description.scm
--- ../lilypond-1.7.8/scm/interface-description.scm	2002-10-21 00:44:17.000000000 +0200
+++ ./scm/interface-description.scm	2002-11-20 01:17:09.000000000 +0100
@@ -32,6 +32,12 @@
  )
 
 (ly:add-interface
+ 'ligature-bracket-interface
+ "A bracket indicating a ligature in the original edition"
+ '(width thickness height ligature-primitive-callback))
+
+
+(ly:add-interface
  'mark-interface
  "a rehearsal mark"
  '(
diff -purN ../lilypond-1.7.8/scm/music-functions.scm ./scm/music-functions.scm
--- ../lilypond-1.7.8/scm/music-functions.scm	2002-11-13 01:40:24.000000000 +0100
+++ ./scm/music-functions.scm	2002-12-01 19:27:12.000000000 +0100
@@ -12,45 +12,58 @@
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-
-(define-public (shift-duration-log music shift dot)
-  "Recurse through music, adding SHIFT to ly:duration-log and optionally 
-  a dot to any note encountered. This scales the music up by a factor 
-  2^shift * (2 - (1/2)^dot)"
+(define-public (music-map function music)
+  "Apply @var{function} to @var{music} and all of the music it contains. "
   (let* ((es (ly:get-mus-property music 'elements))
          (e (ly:get-mus-property music 'element))
-         (n  (ly:music-name music))
-	 (f  (lambda (x)  (shift-duration-log x shift dot)))
 	 )
 
-    ;; FIXME: broken by the great music rename.
-    (if (or (equal? n "Note_req")
-	    (equal? n "Rest_req"))
+    (ly:set-mus-property! music 'elements 
+	(map (lambda (y) (music-map  function y)) es))
+	(if (ly:music? e)
+	    (ly:set-mus-property! music 'element (music-map function  e)))
+	(function music)
+	))
+
+(define-public (display-one-music music)
+  (display music)
+  music
+  )
+
+(define-public (display-music arg)
+  (music-map display-one-music arg))
+  
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(define (shift-one-duration-log music shift dot)
+  "  add SHIFT to ly:duration-log and optionally 
+  a dot to any note encountered. This scales the music up by a factor 
+  2^shift * (2 - (1/2)^dot)"
+
+  (let*
+      (
+       (d (ly:get-mus-property music 'duration))
+       )
+    (if (ly:duration? d)
 	(let* (
-	       (d (ly:get-mus-property music 'duration))
 	       (cp (ly:duration-factor d))
 	       (nd (ly:make-duration (+ shift (ly:duration-log d))
-				  (+ dot (duration-dot-count d))
-				  (car cp)
-				  (cdr cp)))
+				     (+ dot (ly:duration-dot-count d))
+				     (car cp)
+				     (cdr cp)))
 	       
 	       )
 	  (ly:set-mus-property! music 'duration nd)
 	  ))
-    
-    (if (pair? es)
-        (ly:set-mus-property!
-         music 'elements
-         (map f es)))
-    
-    (if (ly:music? e)
-        (ly:set-mus-property!
-         music 'element
-         (f e)))
-    
     music))
 
 
+
+(define-public (shift-duration-log music shift dot)
+  (music-map (lambda (x) (shift-one-duration-log x shift dot))
+	     music))
+  
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; repeats.
 
@@ -406,6 +419,27 @@ Rest can contain a list of beat grouping
     (not (eq? #f (memq symbol (ly:get-grob-property elt 'interfaces))))))
 
 
+;;
+(define-public (smart-bar-check n)
+  "Make  a bar check that checks for a specific bar number. 
+"
+  (let*
+      (
+       (m (make-music-by-name 'ApplyContext))
+       )
+    
+    (define (checker tr)
+      (let* ((bn (ly:get-context-property tr 'currentBarNumber)))
+	(if (= bn  n)
+	    #t
+	    (error
+	     (format "Bar check failed, we should have reached ~a, instead at ~a\n"
+		     n bn ))
+	    )))
+
+    (ly:set-mus-property! m 'procedure checker)
+    m
+    ))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; warn for bare chords at start.
diff -purN ../lilypond-1.7.8/scm/music-property-description.scm ./scm/music-property-description.scm
--- ../lilypond-1.7.8/scm/music-property-description.scm	2002-11-19 11:51:42.000000000 +0100
+++ ./scm/music-property-description.scm	2002-11-29 19:58:49.000000000 +0100
@@ -43,6 +43,7 @@ TODO: consider making type into symbol "
 (music-property-description 'digit integer? "digit for fingering")
 (music-property-description 'direction ly:dir? "Print this up or down?")
 (music-property-description 'text-type symbol? "Particular type of text script (eg. finger, dynamic).")
+(music-property-description 'tempo-unit ly:duration? "The unit for the metronome count.")
 (music-property-description 'element ly:music? "The single child of a Music_wrapper music object, or the body of a repeat.")
 (music-property-description 'elements music-list? "A list of elements for sequential of simultaneous music, or the alternatives of repeated music. ")
 (music-property-description 'force-accidental boolean? "If set, a cautionary accidental should always be printed on this note")
diff -purN ../lilypond-1.7.8/scm/music-types.scm ./scm/music-types.scm
--- ../lilypond-1.7.8/scm/music-types.scm	2002-11-19 11:51:43.000000000 +0100
+++ ./scm/music-types.scm	2002-11-29 19:58:49.000000000 +0100
@@ -462,7 +462,6 @@ c8-[ c c-] c8")
     (TempoEvent
      . (
 	(description .  "")
-	(length . #f)
 	(internal-class-name . "Event")
 	(types . (general-music tempo-event event))
 	)) 
diff -purN ../lilypond-1.7.8/scm/new-markup.scm ./scm/new-markup.scm
--- ../lilypond-1.7.8/scm/new-markup.scm	2002-11-18 01:09:28.000000000 +0100
+++ ./scm/new-markup.scm	2002-12-01 17:01:38.000000000 +0100
@@ -8,7 +8,7 @@
 (define-public (line-markup grob props . rest)
   (stack-molecules
    X 1 1.0 
-   (map (lambda (x) (interpret_markup grob props x)) (car rest)))
+   (map (lambda (x) (interpret-markup grob props x)) (car rest)))
   )
 
 (define (combine-molecule-list lst)
@@ -17,37 +17,71 @@
       ))
 
 (define-public (combine-markup grob props . rest)
-   (combine-molecule-list (map (lambda (x) (interpret_markup grob props x)) (car rest))))
+   (combine-molecule-list (map (lambda (x) (interpret-markup grob props x)) (car rest))))
 
 (define-public (bold-markup grob props . rest)
-   (interpret_markup grob (cons '((font-series .  bold)) props) (car rest))
+   (interpret-markup grob (cons (cons '(font-series . bold) (car props)) (cdr props)) (car rest))
   )
 
 (define-public (column-markup grob props . rest)
   (stack-molecules
    Y -1 0.0 
-   (map (lambda (x) (interpret_markup grob props x)) (car rest)))
+   (map (lambda (x) (interpret-markup grob props x)) (car rest)))
   )
 
-;; todo. Use macro?  
-(map
- (lambda (x)
+(define-public (music-markup grob props . rest)
+  (ly:find-glyph-by-name
+   (ly:get-font grob (cons '((font-family . music)) props))
+   (car rest))
+  )
+
+(define-public (lookup-markup grob props . rest)
+  "Lookup a glyph by name."
+  (ly:find-glyph-by-name
+   (ly:get-font grob props)
+   (car rest))
+  )
 
-   (set-object-property!
-    (eval (string->symbol (string-append (symbol->string x) "-markup")) (current-module))
-    'markup-function? #t))
+(define-public (override-markup grob props . rest)
+  "Tack the 1st args in REST onto PROPS."
+  (interpret-markup grob (cons (list (car rest)) props)
+		    (cadr rest)))
+
+(map (lambda (x)
+       (set-object-property! (car x) 'markup-signature (cdr x))
+       )
+     (list (cons bold-markup 'markup0)
+	   (cons column-markup 'markup-list0)
+	   (cons line-markup  'markup-list0)
+	   (cons combine-markup 'markup0-markup1)
+	   (cons simple-markup 'markup0)
+	   (cons music-markup 'scm0)
+	   (cons override-markup 'scm0-markup1)
+	   (cons lookup-markup 'scm0)
+	   ))
+
+(define markup-module (current-module))
+
+(define-public (lookup-markup-command code)
+  (let*
+      ( (sym (string->symbol (string-append code "-markup")))
+	(var (module-local-variable markup-module sym))
+	)
+    (if (eq? var #f)
+	#f   
+	(cons (variable-ref var) (object-property  (variable-ref var) 'markup-signature))
+    )
+  ))
 
- '(simple column bold combine line )
- )
 
 (define-public (brew-new-markup-molecule grob)
-  (interpret_markup grob
+  (interpret-markup grob
 		    (Font_interface::get_property_alist_chain grob)
 		    (ly:get-grob-property grob 'text)
 		    )
   )
 
-(define (interpret_markup  grob props markup)
+(define (interpret-markup  grob props markup)
   (let*
       (
        (func (car markup))
@@ -57,9 +91,10 @@
     (apply func (cons grob (cons props args)) )
     ))
 
+
 (define (new-markup? x)
 	(markup-function? (car x))
 )
 
 (define (markup-function? x)
-	(object-property 'markup-function? x))
+	(object-property 'markup-signature? x))
diff -purN ../lilypond-1.7.8/scm/ps.scm ./scm/ps.scm
--- ../lilypond-1.7.8/scm/ps.scm	2002-11-13 01:40:24.000000000 +0100
+++ ./scm/ps.scm	2002-11-29 19:58:49.000000000 +0100
@@ -52,13 +52,12 @@
        " "
        (numbers->string
 	(list x0 y0
-	      (/ (sqrt (+ (* (- x1 x2) (- x1 x2)) (* (- y1 y2) (- y1 y2)))) 2)))
+	      (/ (sqrt (+ (* (- x1 x2) (- x1 x2))
+			  (* (- y1 y2) (- y1 y2)))) 2)))
        " draw_dot")))
-  
-  (string-append 
-   (apply string-append (map number-pair->string l))
-   (ly:number->string thick)
-   " draw_bezier_sandwich "
+
+  (string-append
+   (bezier-sandwich l thick)
    (bezier-ending (list-ref l 3) (list-ref l 0) (list-ref l 5))
    (bezier-ending (list-ref l 7) (list-ref l 0) (list-ref l 5))))
 
@@ -275,7 +274,6 @@
     (numbers->string
      (list x y width height blotdiam)) " draw_round_box"))
 
-;; TODO: use HEIGHT argument
 (define (start-system width height)
   (string-append
    "\n" (ly:number->string height)
diff -purN ../lilypond-1.7.8/scm/sketch.scm ./scm/sketch.scm
--- ../lilypond-1.7.8/scm/sketch.scm	2002-11-13 01:40:24.000000000 +0100
+++ ./scm/sketch.scm	2002-11-29 19:58:49.000000000 +0100
@@ -219,10 +219,8 @@
    ;; how to get zero-left padding with ``Guile's fprintf'' ?
    ;;(format #f "txt('\\x~2x',(" i)
    ;;(format #f "txt('\\x~02x',(" i)
-   ;; ugh uhg
-   (if (< i 16)
-       (format #f "txt('\\x0~x',(" i)
-       (format #f "txt('\\x~x',(" i))
+   ;; ugh: python's '%02x' % i
+   (format #f "&#x~2,'0x;" i)
    (sketch-numbers->string (map mul-scale (list x y)))
    "))\n"))
 
diff -purN ../lilypond-1.7.8/scm/sodipodi.scm ./scm/sodipodi.scm
--- ../lilypond-1.7.8/scm/sodipodi.scm	2002-10-15 17:57:40.000000000 +0200
+++ ./scm/sodipodi.scm	2002-12-01 19:27:12.000000000 +0100
@@ -2,21 +2,20 @@
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
 ;;;; 
-;;;; (c) 1998--2002 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; (c) 2002 Jan Nieuwenhuizen <janneke@gnu.org>
 
-;;;; NOTE that Sodipodi
+;;;; NOTE:
 ;;;;
-;;;;  * dumps core on displaying feta characters
-;;;;  * needs PFBs (ie, not PFAs like sketch)
-;;;;  * must have (LilyPond/feta) fonts registered through GNOME's
-;;;;    gnome-font-install (ie, not through X11, like sketch and xfontsel),
-;;;;    which in turn is very picky about afm files
-;;;;  * has it's own svg-like language: possibly this file should be
-;;;;    moved to svg.scm
+;;;; * Get mftrace 1.0.12 or newer
+;;;;
+;;;; * Get sodipodi-0.28 or newer
+;;;;
+;;;; * Link/copy mf/out/private-fonts to ~/.sodipodi/private-fonts 
 
+;;;; http://www.w3.org/TR/SVG11/paths.html
 
-(debug-enable 'backtrace)
 
+(debug-enable 'backtrace)
 
 (define-module (scm sodipodi))
 (define this-module (current-module))
@@ -25,9 +24,6 @@
  (guile)
  (lily))
 
-
-
-
 ;;; Lily output interface --- cleanup and docme
 
 ;;; Bare minimum interface for \score { \notes c } }
@@ -51,8 +47,6 @@
 ;;;    comment
 ;;;    stop-last-system
 
-
-
 ;; Module entry
 ;;(define-public (sodipodi-output-expression expr port)
 ;;  (display (eval expr this-module) port))
@@ -60,7 +54,6 @@
 (define-public (sodipodi-output-expression expr port)
   (display (dispatch expr) port))
 
-
 (define (dispatch expr)
   (let ((keyword (car expr)))
     (cond
@@ -79,6 +72,12 @@
 ;; Global vars
 
 (define output-scale 1)
+(define system-y 0)
+;; huh?
+(define urg-line-thickness 0)
+(define line-thickness 0.001)
+(define half-lt (/ line-thickness 2))
+
 
 (define scale-to-unit
   (cond
@@ -106,37 +105,46 @@
    string "\n</" tag ">\n"))
 
 
-;; Interface functions
-
-(define (char i)
-  (tagify "tspan" (make-string 1 (integer->char i))))
-
-(define (end-output)
-  "</g></svg>")
-
-
-(define (filledbox breapth width depth height)
-  (tagify "rect" ""
-
-	  '(style . "fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-opacity:1;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;")
-	  `(x . ,(number->string (* output-scale (- 0 breapth))))
-	  `(y . ,(number->string (* output-scale (- 0 height))))
-	  `(width . ,(number->string (* output-scale (+ breapth width))))
-	  `(height . ,(number->string (* output-scale (+ depth height))))))
-
+(define (ascii->string i) (make-string 1 (integer->char i)))
+(define (ascii->upm-string i)
+  (let* ((i+1 (+ i 1))
+	 (u1 #xee)
+	 (u2 (+ #x80 (quotient i+1 #x40)))
+	 (u3 (+ #x80 (modulo i+1 #x40))))
+    (apply string-append
+	   (map ascii->string
+		(list u1 u2 u3)))))
 
-(define (fontify name-mag-pair expr)
+(define (control->list c)
+  (list (car c) (cdr c)))
 
-  ;; for simple sodipodi with feta20.pfb:
-;;  (tagify "text" (dispatch expr) '(style . "fill:black;stroke:none;font-family:futa20;font-style:normal;font-weight:normal;font-size:20;fill-opacity:1;stroke-opacity:1;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;text-anchor:start;writing-mode:lr;"))
-
-  ;; Sketch' svg input filter groks this:
-  (tagify "text" (dispatch expr) '(style . "fill:black;stroke:none;font-family:LilyPond-Feta-20;font-style:normal;font-weight:normal;font-size:20;fill-opacity:1;stroke-opacity:1;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;text-anchor:start;writing-mode:lr;"))
+(define (control->string c)
+  (string-append
+   (number->string (car c)) ","
+   ;; loose the -1
+   (number->string (* -1 (cdr c))) " "))
 
-  )
+(define (control-flip-y c)
+  (cons (car c) (* -1 (cdr c))))
 
+(define (numbers->string l)
+  (string-append
+   (number->string (car l))
+   (if (null? (cdr l))
+       ""
+       (string-append ","  (numbers->string (cdr l))))))
+
+(define (svg-bezier l close)
+  (let* ((c0 (car (list-tail l 3)))
+	 (c123 (list-head l 3)))
+    (string-append
+     (if (not close) "M " "L ")
+     (control->string c0)
+     "C " (apply string-append (map control->string c123))
+     (if (not close) "" (string-append
+			 "L " (control->string close))))));; " Z")))))
 
-(define (header creator generate)
+(define xml-header
 "<?xml version='1.0' standalone='no'?>
 <!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 20010904//EN'
 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'
@@ -144,8 +152,12 @@
  <!ATTLIST svg
  xmlns:xlink CDATA #FIXED 'http://www.w3.org/1999/xlink'>
 ]>
-<!-- Created with Sodipodi ('http://www.sodipodi.com/') -->
-<svg
+"
+;;"
+)
+
+(define svg-header
+"<svg
    id='svg1'
    sodipodi:version='0.26'
    xmlns='http://www.w3.org/2000/svg'
@@ -159,23 +171,221 @@
      id='defs3' />
   <sodipodi:namedview
      id='base' />
-  <g tranform='translate(50,-250)'>
+  <g transform='translate(10,10) scale (1.0)'>
   ")
 
 
-(define (placebox x y expr)
-  (tagify "g" (dispatch expr) `(transform .
-					  ,(string-append
-					    "translate(" (number->string
-							  (* output-scale x))
-					    ","
-					    (number->string (- 0 (* output-scale y)))
-					    ")"))))
-				 
+
+;; Interface functions
+
+(define (sqr x)
+  (* x x))
+
+;; transform=scale and stroke don't play nice together...
+(define (XXXbeam width slope thick)
+  (let* ((x width)
+	 (y (* slope width))
+	 (z (sqrt (+ (sqr x) (sqr y)))))
+    (tagify "rect" ""
+	    ;; '(style . "fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-opacity:1;stroke-width:0.1;stroke-linejoin:miter;stroke-linecap:butt;")
+	    ;;'(style . "fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-opacity:1;stroke-width:0.000001;stroke-linejoin:miter;stroke-linecap:butt;")
+	    `(style . ,(format "fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-opacity:1;stroke-width:~f;stroke-linejoin:miter;stroke-linecap:butt;" line-thickness))
+	    ;;`(x . ,(number->string half-lt))
+	    `(x . "0")
+	    ;;`(y . ,(number->string (- half-lt (/ thick 2))))
+	    `(y . ,(number->string (- 0 (/ thick 2))))
+	    `(width . ,(number->string width))
+	    `(height . ,(number->string thick))
+	    `(ry . ,(number->string half-lt))
+	    `(transform . ,(format #f "matrix(~f,~f,0,1,0,0) scale (~f,~f)"
+				   (/ x z)
+				   (* -1 (/ y z))
+				   output-scale output-scale)))))
+
+(define (beam width slope thick)
+  (let* ((x width)
+	 (y (* slope width))
+	 (z (sqrt (+ (sqr x) (sqr y)))))
+    (tagify "rect" ""
+	    `(style . ,(format "fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-opacity:1;stroke-width:~f;stroke-linejoin:miter;stroke-linecap:butt;" line-thickness))
+	    `(x . "0")
+	    `(y . ,(number->string (* output-scale (- 0 (/ thick 2)))))
+	    `(width . ,(number->string (* output-scale width)))
+	    `(height . ,(number->string (* output-scale thick)))
+	    `(ry . ,(number->string (* output-scale half-lt)))
+	    `(transform . ,(format #f "matrix(~f,~f,0,1,0,0) scale (~f,~f)"
+				   (/ x z)
+				   (* -1 (/ y z))
+				   1 1)))))
+
+;; TODO: bezier-ending, see ps.scm
+(define (bezier-bow urg-l thick)
+  
+  (define (bezier-ending z0 z1 z2)
+    (let ((x0 (car z0))
+	  (y0 (cdr z0))
+	  (x1 (car z1))
+	  (y1 (cdr z1))
+	  (x2 (car z2))
+	  (y2 (cdr z2)))
+      (let ((r (/ (sqrt (+ (* (- x1 x2) (- x1 x2))
+			  (* (- y1 y2) (- y1 y2)))) 2)))
+      (tagify "circle" ""
+	      `(fill . "#000000;")
+	      `(cx . ,(number->string (* output-scale x0)))
+	      `(cy . ,(number->string (* output-scale (- 0 y0))))
+	      `(r . ,(number->string (* output-scale r)))))))
+  
+  (let ((l (eval urg-l this-module)))
+    (string-append
+     (bezier-sandwich l thick)
+     (bezier-ending (list-ref l 3) (list-ref l 0) (list-ref l 5))
+     (bezier-ending (list-ref l 7) (list-ref l 0) (list-ref l 5)))))
+
+(define (bezier-sandwich l thick)
+  (let* (;;(l (eval urg-l this-module))
+	 (first (list-tail l 4))
+	 (first-c0 (car (list-tail first 3)))
+	 (second (list-head l 4)))
+    (tagify "path" ""
+	    `(stroke . "#000000")
+	    `(stroke-width . ,(number->string line-thickness))
+	    `(transform . ,(format #f "scale (~f,~f)"
+				   output-scale output-scale))
+	    `(d . ,(string-append (svg-bezier first #f)
+				  (svg-bezier second first-c0))))))
+  
+(define (char i)
+  (if #t
+      ;;(tagify "tspan" (format #f "&#xe0~2,'0x;" i))
+      (tagify "tspan" (ascii->upm-string i))
+      (begin
+	(format #t "can't display char: ~x\n" i)
+	" ")))
+
+
+(define (comment s)
+  (string-append "<!-- " s " -->\n"))
+
+(define (define-fonts internal-external-name-mag-pairs)
+  (comment (format #f "Fonts used: ~S" internal-external-name-mag-pairs)))
+
+(define (end-output)
+  "</g></svg>")
+
+(define (filledbox breapth width depth height)
+  (roundfilledbox breapth width depth height line-thickness))
+
+(define font-cruft
+  "fill:black;stroke:none;text-anchor:start;writing-mode:lr;font-weight:normal;")
+
+;; FIXME
+(define font-alist
+  `(  
+    ("cmr8" . ,(string-append
+		  font-cruft
+		  "font-family:cmr;font-style:normal;font-size:8;"))
+    ("feta13" . ,(string-append
+		  font-cruft
+		  "font-family:LilyPond-Feta;font-style:-Feta;font-size:13;"))
+    ("feta-nummer10" . ,(string-append
+			 font-cruft
+			 "font-family:LilyPond-feta-nummer;font-style:-feta-nummer;font-size:10;"))
+    ("feta20" . ,(string-append
+		  font-cruft
+		  "font-family:LilyPond-feta;font-style:-feta;font-size:20;"))
+    ("parmesan20" . ,(string-append
+		      font-cruft
+		      "font-family:LilyPond-Parmesan;font-style:-Parmesan;font-size:20;"))))
+
+(define (get-font name-mag-pair)
+  ;; name-mag-pair: (quote ("feta20" . 0.569055118110236))"feta20"(quote ("feta20" . 0.569055118110236))
+  (let ((f (assoc (caadr name-mag-pair) font-alist)))
+    (if (pair? f)
+	(cdr f)
+	(begin
+	  (format #t "font not found: ~s\n" (caadr name-mag-pair))
+	  (cdr (assoc "feta20" font-alist))))))
+
+(define (fontify name-mag-pair expr)
+  (string-append
+   (tagify "text" (dispatch expr) (cons 'style (get-font name-mag-pair)))))
+
+(define (header-end)
+  (comment "header-end"))
+
+(define (header creator generate)
+  (string-append
+   xml-header
+   (comment creator)
+   (comment generate)
+   svg-header))
+  
+
 (define (lily-def key val)
-  (if (equal? key "lilypondpaperoutputscale")
-      ;; ugr
-      (set! output-scale (* scale-to-unit (string->number val))))
+  (cond
+   ((equal? key "lilypondpaperoutputscale")
+    ;; ugr
+    ;; If we just use transform scale (output-scale),
+    ;; all fonts come out scaled too (ie, much too big)
+    ;; So, we manually scale all other stuff.
+    (set! output-scale (* scale-to-unit (string->number val))))
+   ((equal? key "lilypondpaperlinethickness")
+    (set! urg-line-thickness (* scale-to-unit (string->number val)))))
   "")
 
+(define (no-origin)
+  "")
+
+
+(define (placebox x y expr)
+  (tagify "g" (dispatch expr)
+	  `(transform .
+		      ,(string-append
+			"translate("
+			;; urg
+			(number->string (* output-scale x))
+			","
+			(number->string (- 0 (* output-scale y)))
+			")"))))
+
+(define (roundfilledbox breapth width depth height blot-diameter)
+  (tagify "rect" ""
+	  ;;'(style . "fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-opacity:1;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;")
+	    `(style . ,(format "fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-opacity:1;stroke-width:~f;stroke-linejoin:miter;stroke-linecap:butt;" line-thickness))
+	  `(x . ,(number->string (* output-scale (- 0 breapth))))
+	  `(y . ,(number->string (* output-scale (- 0 height))))
+	  `(width . ,(number->string (* output-scale (+ breapth width))))
+	  `(height . ,(number->string (* output-scale (+ depth height))))
+	  ;;`(ry . ,(number->string (* output-scale half-lt)))
+	  `(ry . ,(number->string (/ blot-diameter 2)))))
 
+
+  
+;; TODO: use height, set scaling?
+(define (start-system width height)
+  (let ((y system-y))
+    ;;"<g transform='translate(50,-250)'>
+    (set! system-y (+ system-y height))
+    ;;(format #f "<g transform='translate(0,~1,'~f)'>" y)))
+    (string-append
+     "\n"
+     (comment "start-system")
+     (format #f "<g transform='translate(0.0,~f)'>\n" (* output-scale y)))))
+
+(define (stop-system)
+  (string-append
+   "\n"
+   (comment "stop-system")
+   "</g>\n"))
+
+(define stop-last-system stop-system)
+
+(define (text s)
+  ;; to unicode or not?
+  (if #t
+      (tagify "tspan" s)
+      (tagify "tspan"
+	      (apply string-appendb
+		     (map (lambda (x) (ascii->upm-string (char->integer x)))
+			  (string->list s))))))
diff -purN ../lilypond-1.7.8/scripts/convert-ly.py ./scripts/convert-ly.py
--- ../lilypond-1.7.8/scripts/convert-ly.py	2002-11-19 11:51:43.000000000 +0100
+++ ./scripts/convert-ly.py	2002-11-29 19:58:49.000000000 +0100
@@ -1090,7 +1090,7 @@ if 1:
 		str = re.sub (r"\\transpose", r"\\transpose c'", str)
 		str = re.sub (r"\\transpose c' *([a-z]+)'", r"\\transpose c \1", str)
 		return str
-	conversions.append (((1,7,5), conv, '\transpose TO -> \transpose FROM  TO'))
+	conversions.append (((1,7,5), conv, '\\transpose TO -> \\transpose FROM  TO'))
 
 if 1:
 	def conv(str):
diff -purN ../lilypond-1.7.8/scripts/ly2dvi.py ./scripts/ly2dvi.py
--- ../lilypond-1.7.8/scripts/ly2dvi.py	2002-11-06 13:34:16.000000000 +0100
+++ ./scripts/ly2dvi.py	2002-11-29 19:58:49.000000000 +0100
@@ -355,9 +355,11 @@ def one_latex_definition (defn, first):
 
 
 ly_paper_to_latexpaper =  {
-	'a4' : 'a4paper',
 	'letter' : 'letterpaper', 
-	'a3' : 'a3paper'
+	'a3' : 'a3paper',
+	'a4' : 'a4paper',
+	'a5' : 'a5paper',
+	'a6' : 'a6paper',
 }
 
 #TODO: should set textheight (enlarge) depending on papersize. 
@@ -528,8 +530,22 @@ None.
 	if extra['orientation'] and extra['orientation'][0] == 'landscape':
 		opts = opts + ' -tlandscape'
 
+
 	if 'PDF' in targets:
-		opts = opts + ' -Ppdf -G0 -u lilypond.map'
+		where = ly.read_pipe ('kpsewhich feta20.pfa')
+
+		pfa_file  = None
+		if where:
+			try: 
+				pfa_file = open (where, 'r')
+			except IOError:
+				pass
+
+		if pfa_file:
+			opts = opts + ' -Ppdf -G0 -u lilypond.map'
+		else:
+			ly.warning (_ ('''Trying create PDF, but no PFA fonts found.
+Using bitmap fonts instead. This will look poorly.'''))
 		
 	cmd = 'dvips %s -o%s %s' % (opts, outbase + '.ps', outbase + '.dvi')
 	ly.system (cmd)
@@ -735,19 +751,19 @@ if 1:
 		try:
 			run_lilypond (files, dep_prefix)
 		except:
+			### ARGH. This also catches python programming errors.
+			### this should only catch lilypond nonzero exit  status
+			### --hwn
+
+			
  			# TODO: friendly message about LilyPond setup/failing?
  			#
- 			# TODO: lilypond should fail with different
- 			# error codes for:
- 			#   - guile setup/startup failure
- 			#   - font setup failure
- 			#   - init.ly setup failure
- 			#   - parse error in .ly
- 			#   - unexpected: assert/core dump
 			targets = []
 			if verbose_p:
 				traceback.print_exc ()
-
+			else:
+				ly.warning (_("Running LilyPond failed. Rerun with --verbose for a trace."))
+				
 	# Our LilyPond pseudo filter always outputs to 'lelie'
 	# have subsequent stages and use 'lelie' output.
 	if pseudo_filter_p:
@@ -777,11 +793,14 @@ if 1:
 	if 'PS' in targets:
 		try:
 			run_dvips (outbase, extra_init)
+			
 		except: 
 			if 'PS' in targets:
 				targets.remove ('PS')
 			if verbose_p:
 				traceback.print_exc ()
+			else:
+				ly.warning (_("Failed to make PS file. Rerun with --verbose for a trace."))
 
 	if 'PNG' in  targets:
 		ly.make_preview (outbase)
@@ -806,6 +825,9 @@ if 1:
 				targets.remove ('PS')
 			if verbose_p:
 				traceback.print_exc ()
+			else:
+				ly.warning (_("Running LaTeX falied. Rerun with --verbose for a trace."))
+				
 
 	# add DEP to targets?
 	if track_dependencies_p:
diff -purN ../lilypond-1.7.8/stepmake/stepmake/generic-targets.make ./stepmake/stepmake/generic-targets.make
--- ../lilypond-1.7.8/stepmake/stepmake/generic-targets.make	2002-09-28 17:55:40.000000000 +0200
+++ ./stepmake/stepmake/generic-targets.make	2002-12-01 17:01:38.000000000 +0100
@@ -163,6 +163,10 @@ diff:
 release: 
 	$(PYTHON) $(step-bindir)/release.py --outdir=$(topdir)/$(outdir) --package=$(topdir)
 
+rpm-mandrake: $(depth)/$(package-icon) dist
+	$(MAKE) -C $(depth)/make
+	cd $(depth) && rpm -ba make/$(outdir)/lilypond.mandrake.spec
+
 rpm: $(depth)/$(package-icon) dist
 	@echo "Assuming Red Hat system"	#FIXME: check distro, then issue rpm
 	$(MAKE) -C $(depth)/make
diff -purN ../lilypond-1.7.8/stepmake/stepmake/toplevel-targets.make ./stepmake/stepmake/toplevel-targets.make
--- ../lilypond-1.7.8/stepmake/stepmake/toplevel-targets.make	2002-05-17 14:09:10.000000000 +0200
+++ ./stepmake/stepmake/toplevel-targets.make	2002-12-01 17:01:39.000000000 +0100
@@ -66,6 +66,7 @@ local-help:
   doc         update all documentation\n\
   release     roll tarball and generate patch\n\
   rpm         build rpm (Red Hat) package\n\
+  rpm-mandrake build rpm (Mandrake) packages\n\
   po          make new translation Portable Object database\n\
   po-replace  do po-update and replace catalogs with msgmerged versions\n\
   po-update   update translation Portable Object database\n\
diff -purN ../lilypond-1.7.8/VERSION ./VERSION
--- ../lilypond-1.7.8/VERSION	2002-11-19 13:09:59.000000000 +0100
+++ ./VERSION	2002-12-01 20:40:03.000000000 +0100
@@ -1,7 +1,7 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=7
-PATCH_LEVEL=8
+PATCH_LEVEL=9
 MY_PATCH_LEVEL=
 
 # Use the above to send patches: MY_PATCH_LEVEL is always empty for a
