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