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