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