]> git.donarmstrong.com Git - lilypond.git/blob - TODO
patch::: 1.2.9.jcn2
[lilypond.git] / TODO
1 -*-outline-layout:(2 (-1 -1 0 :) 0);outline-stylish-prefixes:nil -*-
2
3 * GNU LilyPond TODO
4 Features you cannot find in the documentation as working, should be
5 mentioned here.  This is an assorted collection of stuff that will be
6 done, might be done, or is an idea that we want to think about.
7 m
8 Most of the items are marked in the code as well
9 Grep -i for TODO, FIXME and ugh/ugr/urg.  
10
11 .* TODO
12 . * use Rhythmic_head::position_i () for all Staff_referenced 
13 . * sleur.ly. * rerun profile
14 . * mmrests
15 . * Break_req handling is silly (break_forbid () + \break fucks up.)
16 . * script engraver
17 . * HaraKiriStaffContext removes bar lines and doesn't remove
18     staff margin text on removed staff lines.
19 . * Chords:
20 .  * Bass/inversion pitch when not part of Chord
21 Sometimes a series of changing chords will be blocked out over a static tone
22 in the bass, usually this was referred to as a pedal tone (and it's been
23 continued to be used, even in contemporary music).  Another less frequently
24 used practice is putting a non-chordal tone in the bass (that is not acting
25 as a pedal tone) in order to create tension or make a more colorful sound.
26 There are examples of this in the classsical literature, but its use is much
27 more prevalent today.  For example, the chord sequence Dm7 - Dm7/G is such a
28 sequence, and the Dm7/G defies easy classification.  Is it a G7(no 3rd)add
29 9/11?  Or is it a G7(no 3rd)add2/4?  Or perhaps Dm7 add11?  It's a heck of a
30 lot easier to read to just leave it as Dm7/G!
31 .  * Diminished does not mean 5-
32 When speaking of a chord, dimished can mean one of two things:  A diminished
33 triad or a dimished seventh chord (which is distinctly different from what's
34 known as the 'half-diminished' chord).  The triad is a root with a flat
35 third and flat fifth, and is notated (at least in America, someone else will
36 have to fill me in on other countries) as (using C as the root) Cdim, or Co.
37 The diminished seventh has a root with a flat third, flat fifth, and a
38 doubly flatted seventh (which is enharmonically equivalent to a sixth, and
39 from which comes tons of confusion).  It is usually notated as (again, using
40 C as the root) Cdim7 or Co7.
41
42 . * Mondrup:
43
44 - I would like the possibility of forcing clef- and key- changes to be
45 printed _after_ the new bar line
46
47 - I would like an option to define the number of systems on which the
48 score must be distributed. As it is now it seems that I may only
49 influence that indirectly through the gourlay_maxmeasures property.
50
51 - if I change the property minVerticalAlign in a multi staff score with
52 lyrics the change affects the lyrics too. I would like the change to
53 _only_ affect staves.
54
55 - I would like to be able to influence the sloping of xtuplet brackets
56
57 - for one of my test scores containing a modern edition of an early
58 17'th century composition I have a leading measure containing the
59 orginal clefs and note values of the original composition. I use the
60 "harmonic" and "diamond" note head styles for that measure and would
61 like to have the stems of these notes _centered_ on the notehead as in
62 the mensural music notation.
63
64 - after the leading measure in the above mentioned score I want a double
65 bar line fully drawn across the staves and after that keep to the
66 ChoirStaff bar line types in the rest of the scores
67
68 - autoBeamMelisma: if I explicitly beam notes in a staff with auto beaming disabled I
69 would like to have these beams also to be melismatic.
70
71 . * make all Feta (including dynamics) available to the user in
72     textual scripts. Examples: "D.S. al \coda", "\mf espress.".
73  
74 . * ?  -Q, --find-old-relative show all changes in relative syntax
75 What's old about absolute to relative conversion?  Could maybe use for
76 abc2ly, midi2ly?
77
78 .* Cleanups needed
79 . * \$ and $ identifier syntax in examples.
80 . * Junk ghost positioning objects eg, Script leans on  Staffside
81     leans on Staff.
82 . * bracket ps code.
83 . * mudela-book
84 .  * center option (??)
85 .  * make mudela-book understand usepackage{geometry}
86 . * Key_engraver, Local_key_item
87 . * Think of comprehensive solution for "if (grace_b == self_grace_b_)"
88 . * String[String.length] doesn't trap.
89 . * Beam
90 . * Stem
91 . * Rhythmic_column and interaction stem/rhythmic_column/note_head/dots.
92 . * Duration
93 . * clef engraver 
94 . * parser
95 . * Lookup::text -> needs  to be TeX independent.
96 . * junk Music_iterator::first_b_
97 . * Bezier
98
99 .* BUGS
100 . * [c8. c16 c16 c16] in 6/8 timesig. 
101 . * staffside spanner (crescendo!) along with staffswitch.
102 . * --- 2, margin notes don't work correctly for the pianostaff (in the
103 following example, i expect the "piano" string to be centered
104 vertically between the two staves):
105
106 \score {
107   \notes \context PianoStaff <
108     \property PianoStaff.instrument = "Piano"
109     \context Staff = treble {
110         a b c
111     }
112     \context Staff = bass {
113         \clef bass;
114         a, b, c,
115     }
116   >
117   \paper {
118     \translator { \StaffContext \consists "Staff_margin_engraver"; }
119     \translator { \PianoStaffContext \consists "Staff_margin_engraver"; }
120   }
121 }
122 . * 
123 > \context Staff <
124 >   {\voiceone''4. r8}
125 >  \voicetwo c,4 r4}
126 > >
127 . * sort out breve shapes.
128 . * \time forces keysig?
129
130 .* STUFF
131 . * We need feta-din*.mf files for more sizes than 10.
132 . *
133 - The syntax for chords looks clumsy with two different meanings of 
134   '-' and different syntax for separating modifiers from the tonic
135   and from other modifiers. Why not use for example ':' between
136   tonic and modifier and between the different modifiers?
137
138 - Rests and beams don't work too well together. Example:
139    [ r8 g''16 des'] [r8 c16 a] 
140
141 - The stemLength property should affect also beamed stems.
142
143 . * align left edge of broken tuplet-spanner (have a test case?)
144 . * fix dynamics decently, ie. use kerning & ligatures.
145 . * key restorations & repeats
146 . * paperXX.ly \quartwidth, font setting not up to date. (Should read from AFM?)
147 . * * auto melismaBusy for beams.
148 . *In Caro Mio Ben, bar 8, there's a syllable that starts on a note, and
149 ends on a pair of grace notes.  Standard practice is to mark this with
150 a slur starting on the main note and ending on the grace note, so a
151 singer knows where to break the words.
152
153 In bar 27, there's a crescendo that's supposed to start at the start
154 of the grace notes and extend to the note after the grace notes.
155 . * 5. Sometimes lyrics extend past the right end of the staff. I guess that
156 this is a similar problem (if not another symptom of the same problem) as
157 one of the spacing bugs mentioned in the TODO.
158 . * 4.  Lyrics and grace sections don't go too well together.
159         The words are aligned with the main note, not the start of the
160         grace note.  This is usually wrong, but is sometimes right.
161 . * decimal point in \paper {}
162 . * tie-direction
163 . * repeats and partial measures.
164 . * rhythmic staff & accidentals.
165 . * use melismaBusy in Lyric context to typeset melismata correctly.  
166 . * ly2dvi/lilypond logfile.
167 . * hang Item on Spanner
168 . * do --safe for PS output?
169 . * msgfmt -o check?
170 . * collision of lyrics with span_bars. See star-spangled.
171 . * Auto_beam debugging output (waarom/wanneer heb jij die weggehaald?)
172 . * It is impossible to typeset two textual scripts that are stacked
173   on top of eachother and avoids note collisions and at the same
174   time are typeset with different textStyle. I tried to move around
175   the text_engraver and other engravers between Voice and Thread 
176   but the granularity is not fine enough, the scripts have to 
177   share the same engraver in order to be get correct vertical 
178   position but than they cannot have different style.
179   In my opinion, all scripts that share the same staff, should
180   be stacked vertically, avoiding collisions with the notes
181   in all voices.
182
183 . * break priority setting from SCM.
184 . * Matanya's tips: 
185 .  * don't  shorten stems/staffs closer to each other.
186 .  * accidentals closer to note head
187 .  * to space the staffs/staffgroups contained in the score.  
188 .  * heavier beams?
189
190 . * tuplets that are written as "number : note", for example
191    "3 : [image of a half note here]".  possible?
192 . * a note with a circle after it, meaning:
193
194    note + circle = note + 1/4 of its length
195
196    the circle is like a dot that's not filled in.  for example, on
197    page three, the c-sharp on the second line should be a quarter with 
198    a circle, not a quarter tied to a sixteenth.  is this at all
199    possible with lily?
200 . * scm-ify \property values.
201 . * make dependencies () a virtual function.
202 . * deprecate hangOnClef.
203 . * Abstraction for engravers:
204 .  * make "in-between" engraver (Tie)
205 .  * make wide_spanner_engraver (line_group_spanner, staff_symbol)
206 . * store req -> element, element -> element causes for warnings
207 . * compulsory hshift
208 . *  My wish list for lyrics. I dream of a time when I will have enough time to
209 become familiar enough with the source code to be able to implement some of
210 these myself, but I don't know when that will be, so I thought I'd "publish"
211 my suggestions in case someone else is in a position to give them some
212 priority. Otherwise, perhaps they could go on the todo list?
213
214 If any of these are already implemented, please let me what the syntax is to
215 use them!
216
217 1. Stanza numbering. Numbering at the beginning of a song with the number
218 set to the left of the first note. It would also be nice (but not as
219 important) to be able to have some form of automatic numbering at the
220 beginning of each new line. This would make it easier to follow songs with a
221 large number of stanzas.
222
223 3. Notes centred above/below lyrics rather than left-aligned.
224
225 4. It would be very nice to be able to build some kind of phrasing into the
226 lyrics of hymns, etc, so that the first words of a phrase are left aligned
227 with each other, the last words are right aligned, and the words in between
228 are centred.
229
230 5. In a song, with (say) four stanzas and a chorus, it would be nice to be
231 able to vertically align the chorus midway between the staves.
232
233 6. It would be nice to be able to put vertical brackets either side of a
234 repeated section with different words for each repeat.
235 . * Give # lines in linebreaking.  
236 . * arrows on slurs.
237 . * rewrite context defs using Scheme
238 . * junk TeX specifics from internal code.
239 . * \selectmusic to cut pieces from music. 
240 . * formatting of input stuff. 
241 .  * deps for ly2dvi
242 . * TODO: merge atom & molecule; make  tree from molecule.
243 . * Align_element::padding  ?
244 . * typo checks on property names?
245 . * use streambufs and iostream
246 to provide IO handling for TeX stream, mudela stream, data-file.
247 . * seriously buffer TeX output (do profile of writing .5 mb TeX file.)
248 . * strip EXEs before installing
249 . * zip target for binary windows dist (JBR)
250 . * fix partial measures in meaningful way.
251 . * uniformise recent feta contributions.
252 .  * bigger and fatter 4/4 C
253 . * relative mode for midi2ly
254 . * junking \skip req in lyrics
255 . * midi2ly empty staffs.
256 . * use Fourier transformation for rhythmic quantisation.
257 . * horizontal centering of dynamics 
258 . * $DEPENDENCIES_OUTPUT support
259 . * turn slope-damping on/off
260 . * sort out directory stuff.
261 .  * --prefix option?
262 .  * -I option per filetype?
263 .  * kpathsea?
264 . * fix vertical alignment and stafflines
265 . * declaring Performers
266 . * text-items clash with stems/beams
267 . * --include, -I option for ly2dvi (pass on to lily)
268 . * fix placement of beam-less abbrev
269 . * \meter 3/4;
270         <{\voiceone cis4. cis8 cis4 | cis4 cis cis | r1 }
271          {\voicetwo cis,4 r r | r2. | r1 }> |
272         }
273 . * Musical_pitch (analogous to Duration and Rhythmic_req)
274           think about, analogous to pitch: 
275            * { a4 a16 } c <-- duration of c?
276            * < a4 b8 > c <-- duration of c?
277 . * \tempo 4. = 90;
278 . * make sure all ex's have a mudela-version
279 . * do rest-collisions for Multi_measure_rests as well.
280 . * split error/warning in error/warning/non_fatal_error
281 . * add a Duration_convert member to Duration_iter to set parameters.
282         Junk global duration settings. 
283 . * en-,discouraged linebreaking: 
284 .  * handle DISALLOW < penalty > FORCE
285 .  * discourage breaking of slurs
286 . * fix variable define/lookup parser global<->paper
287 . * fix title/instrument placements; see input/test/title.ly
288 . * <\voiceone c4. \voicetwo c4>
289 . *  I'd like to change the \repetitions command to Jan's suggested
290   syntax: \repeat "repeatsymbol" 2 {...}, but I'm not sure that
291   I understand the implementation of repeats well enough.
292 . * add full cello suites to web site (kom op, Maarten!)
293 . * rename 'staff_line_leading' (who is being lead where?) to
294 staff_space, interline; (or other meaningful name) and use throughout
295 lily
296
297 [-> leading are the lead strips between the sticks (lines) of
298 typeface. ie. leading is vertical space  --hwn]
299 . * add mudela-book-doc source to webstie.
300 . * Rethink Time_description
301 \cadenza , \meter,  should all be \properties
302 . * fix singleStaffBracket
303 . * rename
304 .  * partial -> anacrouse
305 . * move paper vars into engraver properties
306 . * add new glyphs to font.ly
307 . * check for groff / troff/ nroff et
308 . * more intelligent file searching
309 . * disable spaces in TeX stuff
310 . * handle ^C for tmp/file creation.
311 . * make LilyPond RPM fully relocatable
312 . * better hshift (dots, distance, head dependent)
313 . * didot / big point.
314 . * clefs (AG): The "8" should appear closer to the actual clef,
315 touching it.
316 . * put errorlevel in Input class
317 . * junk nesting slurs
318 . * distinguish between unset and empty properties. 
319
320 .* FONT
321 . * the bracket is ugly (wings are too parabolic, should be more circular)
322 . * versioning for Feta
323 . * rewrite dynamic signs.  They're kind of spaghetti now. 
324 . * The `3' in the meter key is a one or two pixels too thin (at 600dpi)
325         in the middle:
326 . * design macro for penstroke with rounded endings
327 . * timesig C: fat yet less curved.  Check out relations. 
328 . * design decent macro for bulbed endings
329 . * printer dependencies.
330 . * versioning  
331 . * lo-res fixes.
332 . * work out sizes of character fonts.
333 . * more symbols
334 .  * piano pedals: Ped/*
335 .  * maxima notehead
336 .  * coda signs: Segno, O+
337 .  * glissando, arpeggio
338 .  * lengthened trill
339 . * include important spacing dims in fetalog 
340 . * scalability: use blot_diameter everywhere, make font chubbier for
341     small sizes.
342
343 .* 3RD PARTY BUGS
344 . * UMR: Uninitialized memory read
345       This is occurring while in:
346             qst            [qsort.c]
347             qsort          [libc.so.1]
348             Keyword_table::Keyword_table(Keyword_ent*) [keyword.cc:28]
349             My_lily_lexer::My_lily_lexer() [my-lily-lexer.cc:78]
350             My_lily_parser::parse_file(String,String) [my-lily-parser.cc:54]
351             do_one_file(String,String) [scores.cc:124]
352       Reading 4 bytes from 0xefffeca8 on the stack.
353       Address 0xefffeca8 is 728 bytes below frame pointer in function 
354 . *  Array<Axis [2] > axeses;
355
356   for (int i=0; i < loose_elems.size (); i++)
357     {
358       Score_element* elt = loose_elems[i];
359       /*
360             with which axes do we have to meddle?
361       */
362       int j =0;
363       Axis as [2];
364       for (int a = X_AXIS; a < NO_AXES; ++a)
365         if (elt->parent_l (Axis (a)) == this)
366           as[j++] = Axis (a);
367       if (j == 1)
368         as[j++] = as[0];
369
370       axeses.push (as);
371     }
372 . * GNU diff 2.7: diff -rN does not see a new directory with empty file
373 . * patch: don't touch timestamp if all patches fail.
374 . * MetaPost: should not generate setgray for unfill
375 . * mfplain.ini not in tetex 0.9
376 . * mf-to-table -> add space 'before ; in AFM output.  (-> check AFM
377 spec. Is this a bug in afm2tfm?)
378 . * check out GCC signatures?
379 . * glibc 2.0:
380           f = fopen ("/dev/null", "r")
381           assert (feof (f))
382 . * tetex: mfplain.mem
383
384 .* PROJECTS
385 . * Scripts:
386 .  * stack scripts in chords:
387           % fingering:        footing:
388             < a-4 c-2 g-1 >   < c-\ltoe e-\lheel >
389 .  * script-spacing
390 .  * slur parts as a script
391 .  * stack parameterised scripts for fingering and footing:
392
393 . * convert-mudela:
394 .  * automatically add  a \version if not present.
395 .  * better parsing
396 .  * make smarter
397 .  * convert-mudela -e empty.ly
398
399 . * emacs mudela-mode
400 .  *  should handle block comments too.
401 .  *  handle lexer modes (\header, \melodic, \lyric) etc.
402 .  *  indentation
403 .  *  notenames?
404 .  *  fontlock: \melodic \melodic
405
406 . * use properties for:
407 .  * default tempo.
408 .  * cadenza mode? 
409
410 . * page handling:
411 .  * PS output
412 .  * optimal pagebreaking.
413
414 . * internationalisation for input.
415 .  * Unicode support? -> man 7 unicode
416 .  * (The explanation below is mostly intended for Han-Wen and Jan)
417 > Before, the font was changed with macros declared separately for 
418 > pure TeX and LaTeX, but now all the fonts are declared directly in
419 > the generated code using the low-level TeX commands. This circumvents
420 > the fontencoding mechanism of LaTeX and is a potential source of
421 > problems also for us users of the Latin-1 character set. 
422 > I think it still works since the inputencoding latin1 is 
423 > declared by ly2dvi, but it still means that e.g. an o with
424 > umlaut is typeset as a combination of the two symbols 'o' and
425 > 'umlaut' instead of as a single character, as would be the case
426 > if fontencoding OT1 had been used. This shouldn't give any 
427 > difference in layout, though. One of the main argument for using
428 > fontencoding OT1 is for the hyphenation mechanism to work, an 
429 > argument that's clearly irrelevant in our application. Yet we
430 > see the problem for August.
431
432 . * \header
433 .  * output header info to MIDI too.
434
435 . * a musical dictionary. See Documentation/vocabulary-*, other
436 languages:
437 .  * explanations
438 .  * italian
439 .  * german
440 .  * dutch
441 .  * swedish
442          .. ?
443
444 . * chords
445 .  * guitar chords (fret diagrams)
446 .  * other chord name styles (american(?) style)
447 .  * basso continuo
448 .  * MIDI output?
449
450 . * Debug logs:
451 .  * derive lily_stream, Dstream, texstream from ostream?
452 .  * indentable stream as baseclass for TeX stream, lily stream, Dstream.
453 .  * use dstream feature in midi2ly
454 .  * integrate IO checking into stream class
455
456 . * input converters
457 .  * NIFF?
458 .  * ABC? 
459 .  * SMDL?
460
461 . * add to MIDI output:
462 .  * sharp / flat on trills (in MIDI ??)
463 .  * ornaments (and trills?)
464 .  * slurs
465 .  * accents
466 .  * dynamics
467 > Would it be hard to add support for proper dynamics in MIDI output?  I
468 > would really like to have this feature...
469
470 Concretely spoken, for dynamics you have to write a performer
471 (Dynamics_performer), that will take the input requests. If I
472 understand correctly, every MIDI note played must have its dynamic
473 strength set separately.  That means the the Dynamics_performer must
474 set the strength of every Audio_note it finds.  This means that one
475 has to modify existing Audio items.  The best way of doing this is
476 with a broadcast/acknowledge process.
477
478 So the best way of handling this, is
479
480   1 supporting dynamic settings in Audio_note
481
482   2 Write a Dynamics_performer that will modify
483   any notes it finds to set appropriate strengths.
484
485 I'd say that the work involved is not hard, but you have to be fluent
486 with C++ and need some insight into the working of Notation Contexts
487 and friends.  I guess I could do it in a day or so, but if you are not
488 so fluent with the inner workings of LilyPond, it could take you some
489 more time (A few more days?).
490
491 Please note, that I am *not* going to code this myself: my days are
492 valuable, and I think I have more interesting things to do than fixing
493 the MIDI output (I don't even have a soundcard).  But I *do* want to help
494 you or other people with implementing this, so if you need help, don't
495 hesitate to ask.
496 .  * account for rhythmic position in measure
497 .  * etc.
498
499
500 . * Output class, handles : (smallish)
501 .  * help text /(c) notice?
502 .  * version line
503 .  * warning /errors/progress
504 .  * abort on error/warning; exit status
505 .  * quiet/ignore-version options
506 .  * logfile output
507
508 . * PS 
509 .  * speed up PS code.
510 .  * PS lines to .eps files
511 .  * write custom prolog
512
513 . * SGML input
514
515 . * Documentation
516 .  * remove links to non-free SW.
517 .  * internal documentation
518 .  * a general paper. 
519 .  * \properties
520 .   * left/rightbeamcount
521 .   * various other new properties.
522 .  * introduction?
523 .  * info?
524 .  * LaTeX?
525 .  * more manpages?
526 .  * Doc (C) stuff of sheet music
527 .  * a better format?  SGML?  TeX?  Info?
528 .  * a better tutorial
529
530 . * more spanners (smallish)
531 .  * Glissando
532 .  * trill
533
534 . * Rewrite Stem, Beam (hairy)
535 .  * general shaving on Beam and Stem
536 .  * use plet grouping
537 .  * beams over bars
538
539 . * lines:
540 .  * Ledger lines, should be separate item: Ledger_lines
541 .  * set different line sizes / thicknesses
542 .  * beam stem showthrough, inter beam sizes (french vs german style)
543
544 . * Collisions
545 .  * left/right note balls should be handled by Collision:
546         < \multi 2; { \stem 1; <b c> } { <f as b> } >
547
548 . * Keys:
549 .  * merge key{item} & localkey{item}?
550 .  * spacing, national styles?
551
552 . * Support for TAB
553 .  * redo Notehead to allow digits as heads
554 .  * add a \tablature {} lexer mode for easy entering
555
556 . * should adjust stemlength for flag number.
557
558 . * breaking:
559 .  * caching breakpoints
560 .  * saving them
561 .  * specify number of lines
562
563 .* INPUTLANGUAGE
564 . * convention for slurs vs. phrasing marks.
565 . * Language:
566 .  * \translator -> ?
567 .  * fix \partial 
568 .  * \bla {} vs \bla ; 
569 .  * mix engraver hacking with music ?
570 .  * \once\property  KEY = VAL
571 .  * input property
572 .  * abstract grammar.
573 . * Figure out semicolons.
574 . * <c f a>4 ?
575 . * Viola mode?
576
577                 @c c g e g 
578         for
579                 c g es g, 
580
581                 @A c g e g
582         for
583                 cis gis e gis
584 . * configure pitch_byte
585 . * rest name configurable
586
587
588 .* SMALLISH PROJECTS
589
590 . * fix confusing naming in Engraver vs Engraver_group_engraver (context)
591
592 . * A range for context errors (eg. mark both { and }. )
593
594 . * lyric in staff  (sharpsharp in staff, text below)
595
596 . * write Dynamic_line (to group dynamics horizontally)
597
598 . * use Real for all y positions.
599
600 . * half-sharps, half-flats
601
602 . * adaptive accidental spacing.
603
604 . * handle EOF graciously in error messages.
605
606 . * midi esp.: use I32 iso int where 32 bits are needed (or assumed...)
607
608 . * lily \tempo
609
610 . *   % toe to bheel   four to five
611             %   ^_u            4_5  
612             %     -                           
613             %  --|x--         --|x--
614             %  --|---         --|---
615             %  --|---         --|---
616           (where "to" is a tiny bow)
617
618 . * auxilliary file for caching info.
619 . * Text_crescendo
620
621 .* IDEAS
622 . * Output data structures of Mudela in XML/SGML.
623 . * create libmudela, or liblily_frontend
624 . * move MIDI stuff (including Quantization) to a ANSI C libmidi library.
625 . * Spacing_request for manually adjusting spacing
626 . * caching breakpoints
627 . * used fixedpoint arithmetic for min. energy.
628
629 * OUTLINE SETUP
630 .* .EMACS
631 ;;; from outline.el
632 (defvar outline-font-lock-keywords
633   '(;; Highlight headings according to the level.
634     ;; must change this to allout node layout
635     ;;("^\\(\\*+\\)[ \t]*\\(.+\\)?[ \t]*$"
636     ("^\\([.]*[ ]*[*]\\)[ \t]*\\(.*\\)$"
637      (1 font-lock-string-face)
638      (2 (let ((len (- (match-end 1) (match-beginning 1))))
639           (or (cdr (assq len '((1 . font-lock-function-name-face)
640                                (2 . font-lock-keyword-face)
641                                (3 . font-lock-comment-face))))
642               font-lock-variable-name-face))
643         nil t))
644     ;; Highlight citations of the form [1] and [Mar94].
645     ("\\[\\([A-Z][A-Za-z]+\\)*[0-9]+\\]" . font-lock-type-face))
646   "Additional expressions to highlight in Outline mode.")
647
648 (add-hook 'outline-mode-hook
649           '(lambda ()
650             (setq font-lock-maximum-decoration t)
651             (setq font-lock-maximum-decoration t)
652             (make-local-variable 'font-lock-defaults)
653             (setq font-lock-defaults '(outline-font-lock-keywords t))
654             (font-lock-mode global-font-lock-mode)
655         ))
656  
657 (require 'allout)
658 (outline-init 't)
659
660