]> git.donarmstrong.com Git - lilypond.git/blob - TODO
patch::: 1.1.28.jcn1: oudlijn vix + config
[lilypond.git] / TODO
1 -*-outline-layout:(2 (-1 -1 0 :) 0);outline-stylish-prefixes:nil-*-
2
3 * GNU LilyPond TODO
4
5         Features you cannot find in the doco as working, should be
6         mentioned here.  This is an assorted collection of stuff that will be
7         done, might be done, or is an idea that I want to think about
8
9         Most of the items are marked in the code as well, with full
10 explanation.
11         grep for TODO and ugh/ugr/urg
12
13 .* BUGS
14 . * .ly files
15 .  * input/praeludium-fuga-E.ly
16 .  * mutopia/J.S.Bach/wtk1-fugue2.ly
17 .  * fix: text on rests: rediculous dims
18 . * fix midi output:
19 .  * default duration?
20               duration must be not entered explicitely on first note.
21 . * fix singleStaffBracket
22 . * \shape 1st dim skipped? 
23 . * turn slope-damping on/off
24 . * c4 \! \> c4
25 . * tremolo stuff
26 . * gallina barlines.
27 . * fix height of / collisions with lyrics (chords), 
28              see input/test/vertical-text.ly; input/test/repeat.ly
29 . * latex bla.tex broken (titles / \lilyfooter stuff?)
30 . * fix dynamics decently, ie. use kerning & ligatures.  
31 . * fix "I've been drinking too much"
32 . * support_l_arr_ empty in staff-margin's G_staff_side_item
33 . * remove old preformats in RPM
34 . * declaring \score    
35 . * is \break broken? input/test/hara-kiri.ly
36 . * fix OrchestralScore and Hara-kiri (i.e., fix Coriolan)
37 .* TODO before 1.2
38 . * do scaled fonts.
39 . * profile atom smobs
40 . * make ly2dvi test page.
41 . * Try to use Killing_cons iso. Pointer_list
42 . * make dependencies () a virtual function.
43 . * fix Repeated_music_iterator::ok() (constness.)
44 . * one big ly2dvi input that includes *all* tests.
45 . * Don't use boolean properties (0,1), instead check existence
46         of property.
47 . * store req -> element, element -> element causes for warnings
48 . * junk Text_def, use G_text_item instead.
49 . * junk Script_def
50 . * fix partial measures in meaningful way.
51 . * fix AFM for BlueSky AFM files.
52 . * working notehead style.
53 . * add scripts to bars eg.  |^"bla" 
54 . * relative mode for mi2mu
55 . * uniformise recent feta contributions.
56 .  * use SCM and Molecules for {accordeon stuff, }
57 .  * bigger and fatter 4/4 C
58 . * sort out directory stuff.
59 .  * --prefix option?
60 .  * -I option per filetype?
61 .  * kpathsea?
62 . * todo doc left/rightbeamcount
63 . * doc Single_malt_grouping_item
64 . * ly2dvi/lilypond logfile.
65 . * How can I specify a chord whose duration is longer than a whole note?
66          \type ChordNames { \chord{ A1*2-min } }
67
68         gives me a parse error.  And \times doesn't work either.  I can't use
69         a spacer note.  So it seems to be impossible to have long chords of
70         general length.  Of course, in the example above I can use \breve.
71         But what if I want a chord that lasts for 3 whole notes?  Or what
72         about 2.5 whole notes?  Is there a mechanism for getting this kind of
73         length?  
74
75
76         Why does my second extender request get junked in the following:
77
78         \score{
79         < \notes \relative c''{ 
80               a4()b()c()d c()d()b()a }
81             \type Lyrics \lyrics {
82               foo1 __  bar2. __ _4 }
83         > }
84
85         It seems that \cr and \decr don't work any more.  
86
87         \score{
88           \notes{
89              a \cr b \rc c }
90           \paper{linewidth=-1.;}
91         }
92
93         Gives me 
94
95         qq.ly:3:9: warning: can't find (de)crescendo to end:
96              a \cr
97                    b \rc c }
98
99
100
101         Use of semicolons is still rather confusing.  They are obligatory
102         after some types of assignments and illegal after others.  
103
104           \property foo=bar               illegal
105           foo = 3 at top level            illegal
106           foo = 3 inside \paper           obligatory               
107           foo = \notes{ ...} top level    illegal
108           foo = \translator{ } in \paper  obligatory
109
110         As far as I can tell, the sole accomplishment of this syntactic
111         irregularity is to keep the user as confused as possible.  
112
113
114         I was trying to get interstaff beams to work and did this:
115
116         \score{
117         \type GrandStaff <
118         \type Staff=one \notes\relative c'{
119           \stemup
120           [c8 c \translator Staff=two \stemup c c]
121           \translator Staff=one
122           \stemdown 
123           [ b8 \translator Staff=two a8]
124           \translator Staff=one 
125           c4 
126           }
127         \type Staff=two \notes{ \clef bass; s1 }
128         >
129         \paper{
130                          \translator{
131                                  \GrandStaffContext
132                                  minVerticalAlign = 3.0*\staffheight;
133                                  maxVerticalAlign = 3.0*\staffheight;
134                          }
135           linewidth = -1.;
136         }
137         }
138
139         The beams are at the right angle, but they aren't in the right place.
140 . * fractional chord durs.
141 . * hang Item on Spanner
142 . * remove Interval dim_ from Dimension_cache and rename the struct.
143 . * do --safe for PS output?
144 . * convert-mudela --output
145 . * Staff_margin (with a partial measure.)
146 . * fix "I've been drinking too much"
147         r * fix pletvisibility properties:
148 .  * bracket on/off/no-bracket-when-beam
149 .  * num on/off/no-num-when-beam
150 . * fix: standchen.
151 . * junk backlinks?
152 . * junk text{sharp,flat,etc}
153 . * fix convert-mudela manpage
154 . * decimal point in \paper {}
155 . * {  \voiceone <a'4.*2/3  d''4.*2/3 fis''4.*2/3>  [g''8 fis'' e''] d''4 |}
156                   and=20
157                   { \voicetwo  d'4 d'2.*2/3 } spacing
158 . * tied notes for MIDI
159 . * sharp /flat on trills (in MIDI ??)
160 . * scm-ify \property values.
161 . * move class Lookup {} into scm
162 . * collisions/voices \voiceone \voicetwo are broken; see 
163 . * msgfmt -o check?
164 . * \breathmark TeX macro 
165 . * catch GUILE errors?
166 . * add new glyphs to font.ly
167 . * formatting of input stuff. 
168 . * \notes{ a \< b \cr } vs \notes{ a \< b \! }
169 . * if possible, it might be nice for a warning to appear if someone does
170                  \translator with no name and without assigning it to an
171                  identifier.  
172 . * space after bars?
173 . * 'hinterfleisch' before bar (e.g. wtk1-fugue2)?
174 . * \type Voice \times 2/3 { [c8 c16 c16 c16 c16] }
175 . * repeat bars: need distance after ":|" and before "|:"
176 .* SPELLING IRREGULARITIES
177 . * capitalization/use of underscores in property names
178 . * fix SkipBars  -> skipBars
179 . * fix marks/barnumbers/marginal notes
180 . * broken scripts:
181                  lbheel = \script { "bheel" 0 0 -1  0 0 }
182                  rbheel = \script { "bheel" 0 0 1 0 0 }
183                  lbtoe = \script { "btoe" 0 0 -1 0 0 }
184                  rbtoe = \script { "btoe" 0 0 1 0 0 }
185                  lfheel = \script { "fheel" 0 0 -1  0 0 }
186                  rfheel = \script { "fheel" 0 0 1 0 0 }
187                  lftoe = \script { "ftoe" 0 0 -1 0 0 }
188                  rftoe = \script { "ftoe" 0 0 1 0 0 }
189                  and also
190                  portato= \script { "portato" 0 -1 0 1 0 }
191 . * ly2dvi
192 .  * bottomnote for ly2dvi
193 .  * cf'able ly2dvi  tagline.
194 .  * deps for ly2dvi
195 .* STUFF
196 . * check out legal/(c) matters for scores.
197 . * check out GCC signatures?
198 . * Align_element::padding  ?
199 . * uniformise property names...
200 .  * ydirection <-> yDirection
201 .  * rather allow '_' in identifiers first (i.e. junk ^ and _),
202                      and do y_direction?
203 .  * typo checks on property names?
204 . * use streambufs and iostream
205                  to provide IO handling for TeX stream, mudela stream, data-file.
206 . * seriously buffer TeX output (do profile of writing .5 mb TeX file.)
207 . * strip EXEs before installing
208 . * zip target for binary windows dist (JBR)
209 . * junking \skip req in lyrics
210 . * Language:
211 .  * \type -> \context ?
212 .  * \translator -> ?
213 .  * fix \partial 
214 .  * \bla {} vs \bla ; 
215 .  * mix engraver hacking with music ?
216 .  * \once\property  KEY = VAL
217 .  * \addtranslator, \removetranslator
218 .  * junk ^ and _ for scripts
219 .  * junk _ for lyrics.
220 .  * abstract grammar.
221 . * percussion note heads
222 . * mi2mu empty staffs.
223 . * horizontal centering of dynamics 
224 . * gzip RH manpage
225 . * stable make/config stuff
226 . * $DEPENDENCIES_OUTPUT support
227 . * Xdvi zooming ?! Try to understand GS garbage collection.
228                          gs: Error: /undefined in draw_beam
229                          gs: Operand stack:
230 . * fix vertical alignment and stafflines
231 . * GrandStaff needs more work -- I want a single word
232                  `harpsichord' to the left of the grandstaff, not one on each
233                  stave.  (Organ staff -- with separate pedal -- but common
234                  properties may be something to think about.  Of course for
235                  organ you want to be able to give stop indications on the way
236                  through, so the \property Voice.Instrument would be a stop,
237                  and \property GrandStaff.instrument would be PipeOrgan...)
238 . * revise the Score_priority_align_engraver concept.  It sucks. 
239 . * make new VoiceOne, VoiceTwo, VoiceThree contexts with
240         ydirection and hshift preset
241 . * *.yo: fix pod manpage layout legacy
242 . * text-items clash with stems/beams
243 . * --include, -I option for ly2dvi (pass on to lily)
244 . * fix placement of beam-less abbrev
245 . * \meter 3/4;
246                  <{\voiceone cis4. cis8 cis4 | cis4 cis cis | r1 }
247                   {\voicetwo cis,4 r r | r2. | r1 }> |
248                  }
249 . * try to use template<Type> iso MACRO(Type)
250 .  * NEWS: ... Musical_pitch (analogous to Duration and Rhythmic_req)
251                    think about, analogous to pitch: 
252                    * { a4 a16 } c <-- duration of c?
253                    * < a4 b8 > c <-- duration of c?
254 . * \tempo 4. = 90;
255 . * fix audio-items (don't use (input) requests, but copy data)
256 . * make sure all ex's have a mudela-version
257 . * do rest-collisions for Multi_measure_rests as well.
258 . * split error/warning in error/warning/non_fatal_error
259 . * add a Duration_convert member to Duration_iter to set parameters.
260                  Junk global duration settings. 
261 . * minimum length second part broken tie
262 . * en-,discouraged linebreaking: 
263 .  * handle DISALLOW < penalty > FORCE
264 .  * discourage breaking of slurs
265 . * fix variable define/lookup parser global<->paper
266 . * fix title/instrument placements; see input/test/title.ly
267 . * <\voiceone c4. \voicetwo c4>
268 . * add full cello suites to web site (kom op, Maarten!)
269 . * Rethink Time_description
270                   * \cadenza , \meter, \grouping should all be \properties
271 . * rename
272 .  * measure -> bar
273 .  * abbrev -> tremolo
274 .  * abbreviation-beam -> (measured/unmeasured) tremolo
275 .  * partial -> anacrouse
276 . * shared lib
277 . * robustify Beam (in case of no stems, 32nd notes)
278 . * decentralised spring factory
279 . * move paper vars into engraver properties
280 . * check for groff / troff/ nroff et
281 . * more intelligent file searching
282 . * make LilyPond RPM fully relocatable
283 . * disable spaces in TeX stuff
284 . * handle ^C for tmp/file creation.
285 . * dots & rest collisions.
286 . * documentation
287 .  * introduction?
288 .  * info?
289 .  * LaTeX?
290 .  * more manpages?
291 . * versioning for Feta
292 . * the warning about the negative slur/tie length appears twice
293                  which is irritating.
294 . * The `3' in the meter key is a one or two pixels too thin (at 600dpi)
295                  in the middle:
296 . * the bracket is ugly (wings are too parabolic, should be more circular)
297 . * better hshift (dots, distance, head dependent)
298                 * clefs (AG): The "8" should appear closer to the actual clef,
299                   touching it.
300 . * put errorlevel in Input class
301 . * junk nesting slurs
302 . * integrate midi-elts from mi2mu and lily?
303 .* 3RD PARTY BUGS
304 . * GNU diff 2.7: diff -rN does not see a new directory with empty file
305 . * glibc 2.0:
306                    f = fopen ("/dev/null", "r")
307                    assert (feof (f))
308 .* 3RD PARTY PROJECTS:
309 . * make GCC warn about ctor that leaves member vars  uninitialised.
310 . * GNU patch 
311 .  * 'double-fix' mode: ignore identical fix, rather than suggest 
312                      to revert patch direction when (more or less? exactly) the same 
313                      thing is fixed
314 .* PROJECTS
315 . * Scripts:
316 .  * fix position of bar number
317 .  * stack scripts in chords:
318                    % fingering:        footing:
319                      < a-4 c-2 g-1 >   < c-\ltoe e-\lheel >
320 .  * script-spacing
321 .  * slur parts as a script
322 .  * stack parameterised scripts for fingering and footing:
323 . * convert-mudela:
324 .  * automatically add  a \version if not present.
325 .  * better parsing
326 .  * make smarter
327 .  * convert-mudela -e empty.ly
328 . * emacs mudela-mode
329 .  *  should handle block comments too.
330 .  *  handle lexer modes (\header, \melodic, \lyric) etc.
331 .  *  indentation
332 .  *  notenames?
333 .  *  fontlock: \melodic \melodic
334 . * use properties for:
335 .  * plet?
336 .  * Staff_sym size
337 .  * default tempo.
338 .  * font size
339 .  * bartypes (get rid of derived Span_bar_engravers)
340 .  * cadenza mode? 
341 . * page handling:
342 .  * PS output
343 .  * optimal pagebreaking.
344 . * Unicode support? -> man 7 unicode
345 .  * 16 bit Strings
346 .  * -u switch
347 .  * detect of 16/8 bit files
348 .  * examples to go with it.
349 . * Spring_spacer:
350 .  * write a faster Spring_spacer (without matrices if possible)
351 .  * relate energybound to linelen unitspace fontsize etc.
352 .  * used fixed point fp?
353 . * \header
354 .  * output header info to MIDI too.
355 . * a musical dictionary. See Documentation/vocabulary-*, other
356                  languages:
357 .  * explanations
358 .  * italian
359 .  * german
360 .  * dutch
361 .  * swedish
362                  .. ?
363 . * chords
364 .  * guitar chords (fret diagrams)
365 .  * other chord name styles (american(?) style)
366 .  * basso continuo
367 .  * MIDI output?
368 . * Debug logs:
369 .  * derive lily_stream, Dstream, texstream from ostream?
370 .  * indentable stream as baseclass for TeX stream, lily stream, Dstream.
371 .  * use dstream feature in mi2mu
372 .  * integrate IO checking into stream class
373 . * input converters
374 .  * NIFF?
375 .  * ABC? 
376 .  * SMDL?
377 . * add to MIDI output:
378 .  * tempo change
379 .  * ornaments (and trills?)
380 .  * repeat/volta
381 .  * slurs
382 .  * accents
383 .  * dynamics
384 .  * account for rhythmic position in measure
385 .  * etc.
386 . * grace notes
387 .  * make separate class for Grace_*_engravers 
388                  (which is at Voice_gravs level)
389 .  * make encapsulated spacing problems.
390 . * accidentals per Voice_group
391 . * Output class, handles : (smallish)
392 .  * help text /(c) notice?
393 .  * version line
394 .  * warning /errors/progress
395 .  * abort on error/warning; exit status
396 .  * quiet/ignore-version options
397 .  * logfile output
398 . * elaborate Staff_side baseclass:
399 .  * scripts
400 .  * text
401 .  * slur start/end
402 . * PS 
403 .  * speed up PS code.
404 .  * PS lines to .eps files
405 .  * write custom prolog
406 . * Output an output format independent (ofi) typeset file; and 
407                    make ofi2 TeX, MusiXTex, Display PostScript, PostScript,
408                    Ascii... interpreters. (difficult)
409
410 .  * NIFF ?
411 .  * Common Music Notation
412 .  * PostScript output (esp. Beams, Slurs, etc)
413 .  * Move all Score_elems, into libmutype.a
414 .  * SGML
415 . * Documentation
416 .  * Doc (C) stuff of sheet music
417 .  * a better format?  SGML?  TeX?  Info?
418 .  * a better tutorial
419 . * more spanners (smallish)
420 .  * Glissando
421 .  * trill
422 . * Rewrite Stem, Beam and Rhythmic_grouping (hairy)
423 .  * [c8. c32 c32]
424           * * doc on Rhythmic_grouping
425 .  * general shaving on Beam and Stem
426 .  * use plet grouping
427 .  * separate visual from rhythmic info even more
428 .  * beams over bars
429 . * lines:
430 .  * Ledger lines, should be separate item: Ledger_lines, Ledger_lines
431 .  * set different line sizes / thicknesses
432 .  * beam stem showthrough, inter beam sizes (french vs german style)
433 . * Collisions
434 .  * left/right note balls should be handled by Collision:
435                  < \multi 2; { \stem 1; <b c> } { <f as b> } >
436 . * Keys:
437 .  * merge key{item} & localkey{item}?
438 .  * spacing, national styles?
439 . * Support for TAB
440 .  * redo Notehead to allow digits as heads
441 .  * add a \tablature {} lexer mode for easy entering
442 . * should adjust stemlength for flag number.
443 . * breaking:
444 .  * caching breakpoints
445 .  * saving them
446 .  * specify number of lines
447 .* INPUTLANGUAGE
448
449 . * c4 4 4 4 for c4 c4 c4 c4?
450 . * neatly (and readably) expressing concurrent
451                  voices
452 . * <c f a>4 ?
453 . * Viola mode?
454                          @c c g e g 
455                  for
456                          c g es g, 
457                          @A c g e g
458                  for
459                          cis gis e gis
460 . * relative mode for pitch entering
461 . * configure pitch_byte
462 . * rest name configurable
463 .* SMALLISH PROJECTS
464 . * limit memory usage; the full coriolan takes up too much resources.
465 . * fix confusing naming in Engraver vs Engraver_group_engraver (context)
466 . * progress when creating MIDI elts.
467 . * A range for context errors (eg. mark both { and }. )
468 . * lyric in staff  (sharpsharp in staff, text below)
469 . * half sharps/flats
470 . * write Dynamic_line (to group dynamics horizontally)
471 . * use Real for all y positions.
472 . * half-sharps, half-flats
473 . * adaptive accidental spacing.
474 . * handle EOF graciously in error messages.
475 . * declare notenametab?
476 . * midi esp.: use I32 iso int where 32 bits are needed (or assumed...)
477 . * stafftypes: voice names/ instrument names.
478 . * lily \tempo
479 . * C meter iso 4/4, idem for alla breve, etc.
480 . * textspanner: center position
481
482                 *   % toe to bheel   four to five
483                     %   ^_u            4_5  
484                     %     -                           
485                     %  --|x--         --|x--
486                     %  --|---         --|---
487                     %  --|---         --|---
488                   (where "to" is a tiny bow)
489 . * auxilliary file for caching info.
490 . * Text_crescendo
491 . * clean solution for staffsize in items.
492 . * revise calcideal
493 .* IDEAS
494 . * Output data structures of Mudela in XML/SGML.
495 . * create libmudela, or liblily_frontend
496 . * move MIDI stuff (including Quantization) to a ANSI C libmidi library.
497 . * Spacing_request for manually adjusting spacing
498 . * caching breakpoints
499 . * used fixedpoint arithmetic for min. energy.
500 . * move towards incremental algorithms.
501 . * far fetched language ideas
502 .  * design meta-language like TeX and Metafont
503 .  * programming/macros input
504 . * versioning stuff (cvt mudela, mudela, etc.)
505 . * Klavarskribo?
506 . * dynamic loading of engravers? 
507 .* SMOBS
508 . * Han-Wen Nienhuys <hanwen@cs.uu.nl> writes:
509         > mcmanus@IDT.NET writes:
510         > > > I want different C++ objects (with scheme embedded) to be linked by
511         > > > C++ pointers.  I want to access these other objects from the Scheme
512         > > > code, and I want access to these pointers from C++.
513         > > 
514         > > You can do this with a  combination of smob's and primitive functions,
515         > > though it may not be  be exactly what you wanted.   You would have one
516         > > smob  for each class in  your application, and then  you would write a
517         > > primitive function that would return the objects  that are linked to a
518         > > base object.
519         > 
520         > And the smob and the C++ class are interlinked?  Like
521         > 
522         >       class Foo_class {
523         >               Foo_smob *smob_ptr_;
524         >       }
525         > 
526         >       struct Foo_smob {
527         >               Foo_class *class_ptr_
528         >       }
529         Usually you can get away without having this interlinked structure.
530         One piece of information you need when exporting objects to scheme is
531         the smob tag for your class.  You might store this value (a long) into
532         a class static variable, or a file static variable.  I'll use a class
533         static variable in this example.
534         I typically use code that works like this (untested code ahead):
535         class Foo_class {
536         static long *Foo_smob_tag;
537         SCM obj; // representation as a scheme object, description comes later
538         }
539         // call this once on startup
540         void init_Foo_class {
541         static scm_smobfuns type_rec;
542         type_rec.mark = foo_mark;
543         type_rec.free = foo_free;
544         type_rec.print = foo_display;
545         type_rec.equalp = 0;
546         Foo_class::Foo_smob_tag = new int(scm_new_smob(type_rec));
547         }
548         When you want to export an object to scheme, you put a pointer to the
549         object itself in the cdr of the cell, and the tag in the car of the
550         cell.  The code looks like this:
551         // Is this a Foo?
552         static int
553         foo_p(SCM obj)
554         {
555         return(SCM_NIMP(obj) && SCM_CAR(obj) == Foo_class::Foo_smob_tag);
556         }
557         // given a Scheme representation, return, a C++ representation
558         static Foo_class *
559         foo_unbox(SCM obj)
560         {
561         return((Foo_class*)SCM_CDR(obj));
562         }
563         // the SCM representation of the object is stored inside itself
564         // this will become useful when destructor gets called
565         static SCM
566         foo_box(Foo_class *foo)
567         {
568         SCM_DEFER_INTS;
569         SCM_NEWCELL(foo->obj);
570         SCM_SETCAR(foo->obj, Foo_class::Foo_smob_tag);
571         SCM_SETCDR(foo->obj, (SCM)foo);
572         SCM_ALLOW_INTS;
573         return foo->obj;
574         }
575         > C++ determines life time, so what is the strategy?
576         What happens now when the destructor gets called?  Lets set the cdr to
577         NULL, and then check for that in all of the primitive functions that
578         use your smob.  We'll call this notion 'live'; a scheme object is
579         'live' if the C++ representation still exists, it's dead if the C++
580         object is gone.  You can still have references to dead objects in
581         scheme code; it's just an error to use them.  This idea is stolen from
582         Emacs's handling of buffers ('buffer-live-p' and friends).
583         Add another function, foo_live_p:
584         static int
585         foo_live_p(SCM obj)
586         {
587         return(foo_p(obj) && SCM_CDR(obj) != NULL);
588         }
589         In you destructor, you need to do:
590         ~Foo_class()
591         {
592         SCM_CDR(this->obj, NULL);
593         }
594         When writing new primitives, now just check foo_live_p().
595         I hope the above helps,
596         -russ
597         --
598         "Even if you are on the right track, you'll get run over 
599         if you just sit there."  
600         --Will Rogers (1879-1935)
601 . * I am still muddling along with integrating GUILE in LilyPond, and I
602         > have a question.  I want to replace an existing C++ implementation of
603         > identifier tables by GUILE's code.  I've managed to replace
604         > 
605         >       Hash_table<String,Identifier*>
606         > 
607         > by
608         > 
609         >       Hash_table<SCM, Identifier*>
610         > 
611         > and use interning and GUILE symbols for doing the identifier lookup.
612         > But I'd like to use GUILE's hash tables as well, and that's were my
613         > question comes in: is there an interface that allows me to iterate
614         > through the entries of a GUILE hash table?
615         I use the following, which should definitely be provided somewhere
616         in guile, but isn't, AFAIK:
617         (define (hash-table-for-each fn ht)
618         (do ((i 0 (+ 1 i)))
619         ((= i (vector-length ht)))
620         (do ((alist (vector-ref ht i) (cdr alist)))
621         ((null? alist) #t)
622         (fn (car (car alist)) (cdr (car alist))))))
623         (define (hash-table-map fn ht)
624         (do ((i 0 (+ 1 i))
625         (ret-ls '()))
626         ((= i (vector-length ht)) (reverse ret-ls))
627         (do ((alist (vector-ref ht i) (cdr alist)))
628         ((null? alist) #t)
629         (set! ret-ls (cons (fn (car (car alist)) (cdr (car alist))) ret-ls)))))
630         If you want a C version, you can run the above code through hobbit, or
631         tranlate it to C by hand.
632         -russ
633         --
634         "Whenever you find yourself on the side of the majority, it is time to
635         pause and reflect."
636         -- Mark Twain
637 * OUTLINE SETUP
638 .* .EMACS
639 ;;; from outline.el
640 (defvar outline-font-lock-keywords
641   '(;; Highlight headings according to the level.
642     ;; must change this to allout node layout
643     ;;("^\\(\\*+\\)[ \t]*\\(.+\\)?[ \t]*$"
644     ("^\\([.]*[ ]*[*]\\)[ \t]*\\(.*\\)$"
645      (1 font-lock-string-face)
646      (2 (let ((len (- (match-end 1) (match-beginning 1))))
647           (or (cdr (assq len '((1 . font-lock-function-name-face)
648                                (2 . font-lock-keyword-face)
649                                (3 . font-lock-comment-face))))
650               font-lock-variable-name-face))
651         nil t))
652     ;; Highlight citations of the form [1] and [Mar94].
653     ("\\[\\([A-Z][A-Za-z]+\\)*[0-9]+\\]" . font-lock-type-face))
654   "Additional expressions to highlight in Outline mode.")
655
656 (add-hook 'outline-mode-hook
657           (lambda ()
658             (setq font-lock-maximum-decoration t)
659             (setq font-lock-maximum-decoration t)
660             (make-local-variable 'font-lock-defaults)
661             (setq font-lock-defaults '(outline-font-lock-keywords t))
662             (font-lock-mode (global-font-lock-mode))))
663
664 (require 'allout)
665 (outline-init 't)