]> git.donarmstrong.com Git - lilypond.git/blob - TODO
d68cafc8308d38415a2eeb2e4eecc1b705d7e09c
[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
9 Grep for TODO and ugh/ugr/urg.  
10
11 .* BUGS
12 . * junk separate mudela versioning. 
13 . * petite-ouverture time sig size. 
14 . * PostScript
15 .  * header for PS enteredby = "bla <bla@bar.com>"
16 .  * ps/lily.ps see comments.
17 . * By the way, I'm not sure the translation of 'C, G, and F clef'
18 > should include Alto, Violin, Bass <clef translated>.
19 [..]
20
21 I understand your point.  It should be changed.
22
23
24
25 > The terms C-clef, G-clef, F-clef stand for the signs, being
26 > mutated forms of a C, a G and an F.
27
28 > The terms Violin Clef etc. stand for the signs being used in
29 > special positions on the staff.
30
31 > The G-clef-sign indicates g' on the line around which the
32 > snake centers. It is a Violin Clef if it is centered around the
33 > second line (from below), and a French Violin Clef if it is
34 > centered around the lowest.
35
36 > The C-clef indicates c' on the line that gets
37 > 'pinched' by it. It is a Soprano, Mezzosoprano (English?), Alto, Tenor
38 > and (don't remember exactly, maybe Baritone) Clef, depending on
39 > the line (from highest to lowest).
40
41 > The F-clef-sign indicates f on the line between
42 > the two dots. If it's on the second line from above, it is called
43 > Bass Clef. If it's on the middle line, it is called (maybe
44 > Baritone) Clef too, because it indicates the same pitches as the
45 > C-Clef on the highest line. So, you could write an Alto Clef by
46 > putting the F-clef sign on the lowest line (but that's _very_
47 > uncommon).
48
49 > Sorry, this is written very messy because I'm in a hurry,
50 > but I hope you understand what I want to say.
51
52 . * didot / big point.
53 . * midi key.
54 . * Repeats
55 .  * input/bugs/rep.ly (moved from test)
56 .  * unfold broken: 
57 .   * without alternatives: repeat unfold 4 { a b c d }
58 .   * count > alternatives: repeat unfold 79 { a b c d } 
59 \alternative { { c c c c } { d d d d } }
60 .  * kind of 'initial property' iso fold/volta(semi)/unfold strings
61 . * fix singleStaffBracket
62 . * declare performers in \midi
63 . * fix MIDI
64 . * \shape 1st dim skipped? 
65 . * turn slope-damping on/off
66 . * tremolo stuff
67 . * We need feta-din*.mf files for more sizes than 10.
68 . * feta-accordeon has some 'strange turning paths' on 300dpi
69 . * fix dynamics decently, ie. use kerning & ligatures.  
70 . * dots & rest collisions?
71 . * mudela-book.py
72 .  * fix \mudelafile{} to have decent functionality
73 .  * P.P.S. It can be cool in mudela-book to distinguish in
74 pre,postMudelaExample, whether MudelaExample is epsed or not: ( if
75 this fragment is floating eps, than 1, otherwise 2). say
76 preMudelaExample[eps]{}, and change it in document body sometimes.
77 .  * use less RE's
78 . * slurs colllide with lyrics.
79 . * Is there any reasonable way to do this: I would like to have one file
80 that can generate the same tune in two different modes without having
81 to go through and rewrite all the music in the other mode.
82
83 Lyrics and scripts collide.
84 . * Phrasing:  Indicating the textual underlay of a piece, or
85 otherwise dividing a piece into phrases.
86
87 There are distinct ways of specifying the first two (although at
88 present, they're not properly distinguished) but no distinct way to
89 specify the third.  Should there be?
90 . * rest collision minimum dist.
91 . * a note with a circle after it, meaning:
92
93    note + circle = note + 1/4 of its length
94
95 5   the circle is like a dot that's not filled in.  for example, on
96    page three, the c-sharp on the second line should be a quarter with 
97    a circle, not a quarter tied to a sixteenth.  is this at all
98    possible with lily?
99 . * tuplets that are written as "number : note", for example
100    "3 : [image of a half note here]".  possible?
101 . * repeat engraver, gallina.ly
102
103 . * Matanya's tips: 
104 .  * spacing for prefatory matter
105 .  * accidentals closer to note head
106 .  * to space the staffs/staffgroups contained in the score.  
107 .  * heavier beams?
108
109 .* Cleanups needed
110 . * Beam
111 . * Stem
112 . * Slur
113 . * Rhythmic_grouping
114 . * Duration
115 . * Collision
116 . * Rest_collision
117 . * clef grav prop's 
118 . * parser
119
120 .* TODO before 1.2
121 . * Morally pure LilyPond.
122 .  * Remove mutopia ramblings.
123 .  * Remove non-free software links.
124 .  * Remove meta article LilyPond.
125 . * break priority setting from SCM.
126 . * Gade score
127 .  * remove [] in favour of auto-beamer
128 . * hangOnClef with non-breakable clefs.
129 . * Aha, the problem is the new TeX code generation for changing fonts.
130 > (The explanation below is mostly intended for Han-Wen and Jan)
131 > Before, the font was changed with macros declared separately for 
132 > pure TeX and LaTeX, but now all the fonts are declared directly in
133 > the generated code using the low-level TeX commands. This circumvents
134 > the fontencoding mechanism of LaTeX and is a potential source of
135 > problems also for us users of the Latin-1 character set. 
136 > I think it still works since the inputencoding latin1 is 
137 > declared by ly2dvi, but it still means that e.g. an o with
138 > umlaut is typeset as a combination of the two symbols 'o' and
139 > 'umlaut' instead of as a single character, as would be the case
140 > if fontencoding OT1 had been used. This shouldn't give any 
141 > difference in layout, though. One of the main argument for using
142 > fontencoding OT1 is for the hyphenation mechanism to work, an 
143 > argument that's clearly irrelevant in our application. Yet we
144 > see the problem for August.
145 . * Abstraction for engravers:
146 .  * make "in-between" engraver (Tie, Extender)
147 .  * make wide_spanner_engraver (line_group_spanner, staff_symbol)
148 . * remove Interval dim_ from Dimension_cache and rename the struct.
149 . * do scaled fonts generally 
150 . * Spacing.
151 . * The Lilypond accidental symbols are available through the TeX macros, 
152 \textflat, \textsharp and \textnatural defined in the init file
153 lilyponddefs.tex. All the symbols are defined in the files fetaXX.tex
154 where XX corresponds to the size. I don't know where (or even if) they
155 are installed but they are generated in the mf/out/ directory during the
156 compilation.
157 . * make dependencies () a virtual function.
158 . * one big ly2dvi input that includes *all* tests.
159 . * store req -> element, element -> element causes for warnings
160 . * include examples in RPM.
161 . * fix partial measures in meaningful way.
162 . * add scripts to bars eg.  |^"bla" 
163 . * relative mode for mi2mu
164 . * uniformise recent feta contributions.
165 .  * use SCM and Molecules for {accordeon stuff, }
166 .  * bigger and fatter 4/4 C
167 . * sort out directory stuff.
168 .  * --prefix option?
169 .  * -I option per filetype?
170 .  * kpathsea?
171 . * ly2dvi/lilypond logfile.
172 . * fractional chord durs.
173 . * hang Item on Spanner
174 . * do --safe for PS output?
175 . * convert-mudela --output
176 . * Staff_margin (with a partial measure.)
177 . * fix pletvisibility properties:
178 .  * bracket on/off/no-bracket-when-beam
179 .  * num on/off/no-num-when-beam
180 . * fix: standchen.
181 . * junk text{sharp,flat,etc}
182 . * fix convert-mudela manpage
183 . * decimal point in \paper {}
184 . * {  \voiceone <a'4.*2/3  d''4.*2/3 fis''4.*2/3>  [g''8 fis'' e''] d''4 |}
185          and
186          { \voicetwo  d'4 d'2.*2/3 } spacing
187 . * tied notes for MIDI
188 . * sharp / flat on trills (in MIDI ??)
189 . * scm-ify \property values.
190 . * move class Lookup {} into scm
191 . * msgfmt -o check?
192 . * \breathmark TeX macro 
193 . * add new glyphs to font.ly
194 . * formatting of input stuff. 
195 . * \notes{ a \< b \cr } vs \notes{ a \< b \! }
196 . * space after bars?
197 . * 'hinterfleisch' before bar (e.g. wtk1-fugue2)?
198 . * Summary of minor spelling irregularities:
199 .  *  capitalization/use of underscores in property names
200 .  * fix SkipBars  -> skipBars
201 . * broken scripts:
202         lbheel = \script { "bheel" 0 0 -1  0 0 }
203         rbheel = \script { "bheel" 0 0 1 0 0 }
204         lbtoe = \script { "btoe" 0 0 -1 0 0 }
205         rbtoe = \script { "btoe" 0 0 1 0 0 }
206         lfheel = \script { "fheel" 0 0 -1  0 0 }
207         rfheel = \script { "fheel" 0 0 1 0 0 }
208         lftoe = \script { "ftoe" 0 0 -1 0 0 }
209         rftoe = \script { "ftoe" 0 0 1 0 0 }
210         and also
211         portato= \script { "portato" 0 -1 0 1 0 }
212 . * ly2dvi
213 .  * bottomnote for ly2dvi
214 .  * deps for ly2dvi
215
216 .* STUFF
217 . * compulsory hshift
218 . * Give # lines in linebreaking.  
219 . * arrows on slurs.
220 . * rewrite context defs using Scheme
221 . * \selectmusic to cut pieces from music. 
222 . * TODO: merge atom & molecule; make  tree from molecule.
223 . * Align_element::padding  ?
224 . * typo checks on property names?
225 . * use streambufs and iostream
226         to provide IO handling for TeX stream, mudela stream, data-file.
227 . * seriously buffer TeX output (do profile of writing .5 mb TeX file.)
228 . * strip EXEs before installing
229 . * zip target for binary windows dist (JBR)
230 . * junking \skip req in lyrics
231 . * mi2mu empty staffs.
232 . * use Fourier transformation for rhythmic quantisation.
233 . * horizontal centering of dynamics 
234 . * $DEPENDENCIES_OUTPUT support
235 . * fix vertical alignment and stafflines
236 . * declaring Performers
237 . * *.yo: fix pod manpage layout legacy
238 . * text-items clash with stems/beams
239 . * --include, -I option for ly2dvi (pass on to lily)
240 . * fix placement of beam-less abbrev
241 . * \meter 3/4;
242         <{\voiceone cis4. cis8 cis4 | cis4 cis cis | r1 }
243          {\voicetwo cis,4 r r | r2. | r1 }> |
244         }
245 . * Musical_pitch (analogous to Duration and Rhythmic_req)
246           think about, analogous to pitch: 
247            * { a4 a16 } c <-- duration of c?
248            * < a4 b8 > c <-- duration of c?
249 . * \tempo 4. = 90;
250 . * fix audio-items (don't use (input) requests, but copy data)
251 . * make sure all ex's have a mudela-version
252 . * do rest-collisions for Multi_measure_rests as well.
253 . * split error/warning in error/warning/non_fatal_error
254 . * add a Duration_convert member to Duration_iter to set parameters.
255         Junk global duration settings. 
256 . * en-,discouraged linebreaking: 
257 .  * handle DISALLOW < penalty > FORCE
258 .  * discourage breaking of slurs
259 . * fix variable define/lookup parser global<->paper
260 . * fix title/instrument placements; see input/test/title.ly
261 . * <\voiceone c4. \voicetwo c4>
262 . * add full cello suites to web site (kom op, Maarten!)
263 . * add mudela-book-doc source to webstie.
264 . * Rethink Time_description
265 \cadenza , \meter, \grouping should all be \properties
266 . * rename
267 .  * measure -> bar
268 .  * abbrev -> tremolo
269 .  * abbreviation-beam -> (measured/unmeasured) tremolo
270 .  * partial -> anacrouse
271 . * robustify Beam (in case of no stems, 32nd notes)
272 . * move paper vars into engraver properties
273 . * check for groff / troff/ nroff et
274 . * more intelligent file searching
275 . * disable spaces in TeX stuff
276 . * handle ^C for tmp/file creation.
277 . * make LilyPond RPM fully relocatable
278 . * dots & rest collisions.
279 . * the warning about the negative slur/tie length appears twice
280 which is irritating.
281 . * better hshift (dots, distance, head dependent)
282 . * clefs (AG): The "8" should appear closer to the actual clef,
283 touching it.
284 . * put errorlevel in Input class
285 . * junk nesting slurs
286 . * integrate midi-elts from mi2mu and lily?
287 . * distinguish between unset and empty properties. 
288
289 .* FONT
290 . * the bracket is ugly (wings are too parabolic, should be more circular)
291 . * versioning for Feta
292 . * rewrite dynamic signs.  They're kind of spaghetti now. 
293 . * The `3' in the meter key is a one or two pixels too thin (at 600dpi)
294         in the middle:
295 . * design macro for penstroke with rounded endings
296 . * timesig C: fat yet less curved.  Check out relations. 
297 . * design decent macro for bulbed endings
298 . * printer dependencies.
299 . * versioning  
300 . * lo-res fixes.
301 . * work out sizes of character fonts.
302 . * more symbols
303 .  * piano pedals: Ped/*
304 .  * maxima notehead
305 .  * coda signs: Segno, O+
306 .  * glissando, arpeggio
307 .  * lengthened trill
308 . * include important spacing dims in fetalog 
309 . * scalability: use blot_diameter everywhere, make font chubbier for
310     small sizes.
311
312 .* 3RD PARTY BUGS
313 . * GNU diff 2.7: diff -rN does not see a new directory with empty file
314 . * check out GCC signatures?
315 . * glibc 2.0:
316           f = fopen ("/dev/null", "r")
317           assert (feof (f))
318
319 . * tetex: mfplain.mem
320 .* 3RD PARTY PROJECTS:
321 . * make GCC warn about ctor that leaves member vars  uninitialised.
322 . * GNU patch 
323 .  * 'double-fix' mode: ignore identical fix, rather than suggest 
324             to revert patch direction when (more or less? exactly) the same 
325             thing is fixed
326 .* PROJECTS
327 . * Scripts:
328 .  * stack scripts in chords:
329           % fingering:        footing:
330             < a-4 c-2 g-1 >   < c-\ltoe e-\lheel >
331 .  * script-spacing
332 .  * slur parts as a script
333 .  * stack parameterised scripts for fingering and footing:
334
335 . * convert-mudela:
336 .  * automatically add  a \version if not present.
337 .  * better parsing
338 .  * make smarter
339 .  * convert-mudela -e empty.ly
340
341 . * emacs mudela-mode
342 .  *  should handle block comments too.
343 .  *  handle lexer modes (\header, \melodic, \lyric) etc.
344 .  *  indentation
345 .  *  notenames?
346 .  *  fontlock: \melodic \melodic
347
348 . * use properties for:
349 .  * default tempo.
350 .  * cadenza mode? 
351
352 . * page handling:
353 .  * PS output
354 .  * optimal pagebreaking.
355
356 . * Unicode support? -> man 7 unicode
357 .  * 16 bit Strings
358 .  * -u switch
359 .  * detect of 16/8 bit files
360 .  * examples to go with it.
361
362 . * \header
363 .  * output header info to MIDI too.
364
365 . * a musical dictionary. See Documentation/vocabulary-*, other
366 languages:
367 .  * explanations
368 .  * italian
369 .  * german
370 .  * dutch
371 .  * swedish
372          .. ?
373
374 . * chords
375 .  * guitar chords (fret diagrams)
376 .  * other chord name styles (american(?) style)
377 .  * basso continuo
378 .  * MIDI output?
379
380 . * Debug logs:
381 .  * derive lily_stream, Dstream, texstream from ostream?
382 .  * indentable stream as baseclass for TeX stream, lily stream, Dstream.
383 .  * use dstream feature in mi2mu
384 .  * integrate IO checking into stream class
385
386 . * input converters
387 .  * NIFF?
388 .  * ABC? 
389 .  * SMDL?
390
391 . * add to MIDI output:
392 .  * tempo change
393 .  * ornaments (and trills?)
394 .  * slurs
395 .  * accents
396 .  * dynamics
397 > Would it be hard to add support for proper dynamics in MIDI output?  I
398 > would really like to have this feature...
399
400 Concretely spoken, for dynamics you have to write a performer
401 (Dynamics_performer), that will take the input requests. If I
402 understand correctly, every MIDI note played must have its dynamic
403 strength set separately.  That means the the Dynamics_performer must
404 set the strength of every Audio_note it finds.  This means that one
405 has to modify existing Audio items.  The best way of doing this is
406 with a broadcast/acknowledge process.
407
408 So the best way of handling this, is
409
410   1 supporting dynamic settings in Audio_note
411
412   2 Write a Dynamics_performer that will modify
413   any notes it finds to set appropriate strengths.
414
415 I'd say that the work involved is not hard, but you have to be fluent
416 with C++ and need some insight into the working of Notation Contexts
417 and friends.  I guess I could do it in a day or so, but if you are not
418 so fluent with the inner workings of LilyPond, it could take you some
419 more time (A few more days?).
420
421 Please note, that I am *not* going to code this myself: my days are
422 valuable, and I think I have more interesting things to do than fixing
423 the MIDI output (I don't even have a soundcard).  But I *do* want to help
424 you or other people with implementing this, so if you need help, don't
425 hesitate to ask.
426 .  * account for rhythmic position in measure
427 .  * etc.
428
429 . * grace notes
430 .  * make separate class for Grace_*_engravers 
431         (which is at Voice_gravs level)
432 .  * make encapsulated spacing problems.
433
434 . * accidentals per Voice_group
435
436 . * Output class, handles : (smallish)
437 .  * help text /(c) notice?
438 .  * version line
439 .  * warning /errors/progress
440 .  * abort on error/warning; exit status
441 .  * quiet/ignore-version options
442 .  * logfile output
443
444 . * PS 
445 .  * speed up PS code.
446 .  * PS lines to .eps files
447 .  * write custom prolog
448
449 . * SGML input
450
451 . * Documentation
452 .  * remove links to non-free SW.
453 .  * internal documentation
454 .  * a general paper. 
455 .  * \properties
456 .   * left/rightbeamcount
457 .   * various other new properties.
458 .  * introduction?
459 .  * info?
460 .  * LaTeX?
461 .  * more manpages?
462 .  * Doc (C) stuff of sheet music
463 .  * a better format?  SGML?  TeX?  Info?
464 .  * a better tutorial
465
466 . * more spanners (smallish)
467 .  * Glissando
468 .  * trill
469
470 . * Rewrite Stem, Beam and Rhythmic_grouping (hairy)
471 .  * [c8. c32 c32]
472 .  * doc on Rhythmic_grouping
473 .  * general shaving on Beam and Stem
474 .  * use plet grouping
475 .  * separate visual from rhythmic info even more
476 .  * beams over bars
477
478 . * lines:
479 .  * Ledger lines, should be separate item: Ledger_lines
480 .  * set different line sizes / thicknesses
481 .  * beam stem showthrough, inter beam sizes (french vs german style)
482
483 . * Collisions
484 .  * left/right note balls should be handled by Collision:
485         < \multi 2; { \stem 1; <b c> } { <f as b> } >
486
487 . * Keys:
488 .  * merge key{item} & localkey{item}?
489 .  * spacing, national styles?
490
491 . * Support for TAB
492 .  * redo Notehead to allow digits as heads
493 .  * add a \tablature {} lexer mode for easy entering
494
495 . * should adjust stemlength for flag number.
496
497 . * breaking:
498 .  * caching breakpoints
499 .  * saving them
500 .  * specify number of lines
501
502 .* INPUTLANGUAGE
503 . * \rhythms 4 16 16 16 16; c c c c c -> c4 c16 etc. 
504 . * Language:
505 .  * \translator -> ?
506 .  * fix \partial 
507 .  * \bla {} vs \bla ; 
508 .  * mix engraver hacking with music ?
509 .  * \once\property  KEY = VAL
510 .  * \addtranslator, \removetranslator
511 .  * junk ^ and _ for scripts
512 .  * junk _ for lyrics.
513 .  * abstract grammar.
514 . * Figure out semicolons.
515 . * c4 4 4 4 for c4 c4 c4 c4?
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 . * configure pitch_byte
527 . * rest name configurable
528
529
530 .* SMALLISH PROJECTS
531
532 . * Faulenzer sign (% repeat).  Perhaps also use \repeat syntax?
533
534 . * fix confusing naming in Engraver vs Engraver_group_engraver (context)
535
536 . * progress when creating MIDI elts.
537
538 . * A range for context errors (eg. mark both { and }. )
539
540 . * lyric in staff  (sharpsharp in staff, text below)
541
542 . * half sharps/flats
543
544 . * write Dynamic_line (to group dynamics horizontally)
545
546 . * use Real for all y positions.
547
548 . * half-sharps, half-flats
549
550 . * adaptive accidental spacing.
551
552 . * handle EOF graciously in error messages.
553
554 . * midi esp.: use I32 iso int where 32 bits are needed (or assumed...)
555
556 . * stafftypes: voice names/ instrument names.
557
558 . * lily \tempo
559
560 . *   % toe to bheel   four to five
561             %   ^_u            4_5  
562             %     -                           
563             %  --|x--         --|x--
564             %  --|---         --|---
565             %  --|---         --|---
566           (where "to" is a tiny bow)
567
568 . * auxilliary file for caching info.
569
570 . * Text_crescendo
571
572 . * revise calcideal
573
574 .* IDEAS
575 . * Output data structures of Mudela in XML/SGML.
576 . * create libmudela, or liblily_frontend
577 . * move MIDI stuff (including Quantization) to a ANSI C libmidi library.
578 . * Spacing_request for manually adjusting spacing
579 . * caching breakpoints
580 . * used fixedpoint arithmetic for min. energy.
581 . * move towards incremental algorithms.
582 . * versioning stuff (cvt mudela, mudela, etc.)
583 . * dynamic loading of engravers? 
584 .* SMOBS
585 Han-Wen Nienhuys <hanwen@cs.uu.nl> writes:
586
587 >       class Foo_class {
588 >               Foo_smob *smob_ptr_;
589 >       }
590
591 >       struct Foo_smob {
592 >               Foo_class *class_ptr_
593 >       }
594
595 Usually you can get away without having this interlinked structure.
596 One piece of information you need when exporting objects to scheme is
597 the smob tag for your class.  You might store this value (a long) into
598 a class static variable, or a file static variable.  I'll use a class
599 static variable in this example.
600
601 I typically use code that works like this (untested code ahead):
602
603 class Foo_class {
604     static long *Foo_smob_tag;
605     SCM obj; // representation as a scheme object, description comes later
606 }
607
608 // call this once on startup
609 void init_Foo_class {
610     static scm_smobfuns type_rec;
611
612     type_rec.mark = foo_mark;
613     type_rec.free = foo_free;
614     type_rec.print = foo_display;
615     type_rec.equalp = 0;
616     Foo_class::Foo_smob_tag = new int(scm_new_smob(type_rec));
617 }
618
619 When you want to export an object to scheme, you put a pointer to the
620 object itself in the cdr of the cell, and the tag in the car of the
621 cell.  The code looks like this:
622
623 // Is this a Foo?
624 static int
625 foo_p(SCM obj)
626 {
627     return(SCM_NIMP(obj) && SCM_CAR(obj) == Foo_class::Foo_smob_tag);
628 }
629
630 // given a Scheme representation, return, a C++ representation
631 static Foo_class *
632 foo_unbox(SCM obj)
633 {
634     return((Foo_class*)SCM_CDR(obj));
635 }
636
637 // the SCM representation of the object is stored inside itself
638 // this will become useful when destructor gets called
639 static SCM
640 foo_box(Foo_class *foo)
641 {
642     SCM_DEFER_INTS;
643     SCM_NEWCELL(foo->obj);
644     SCM_SETCAR(foo->obj, Foo_class::Foo_smob_tag);
645     SCM_SETCDR(foo->obj, (SCM)foo);
646     SCM_ALLOW_INTS;
647     return foo->obj;
648 }
649
650 > C++ determines life time, so what is the strategy?
651
652 What happens now when the destructor gets called?  Lets set the cdr to
653 NULL, and then check for that in all of the primitive functions that
654 use your smob.  We'll call this notion 'live'; a scheme object is
655 'live' if the C++ representation still exists, it's dead if the C++
656 object is gone.  You can still have references to dead objects in
657 scheme code; it's just an error to use them.  This idea is stolen from
658 Emacs's handling of buffers ('buffer-live-p' and friends).
659
660 Add another function, foo_live_p:
661
662 static int
663 foo_live_p(SCM obj)
664 {
665     return(foo_p(obj) && SCM_CDR(obj) != NULL);
666 }
667
668 In you destructor, you need to do:
669
670 ~Foo_class()
671 {
672     SCM_CDR(this->obj, NULL);
673 }
674
675 When writing new primitives, now just check foo_live_p().
676
677 I hope the above helps,
678
679
680 * OUTLINE SETUP
681 .* .EMACS
682 ;;; from outline.el
683 (defvar outline-font-lock-keywords
684   '(;; Highlight headings according to the level.
685     ;; must change this to allout node layout
686     ;;("^\\(\\*+\\)[ \t]*\\(.+\\)?[ \t]*$"
687     ("^\\([.]*[ ]*[*]\\)[ \t]*\\(.*\\)$"
688      (1 font-lock-string-face)
689      (2 (let ((len (- (match-end 1) (match-beginning 1))))
690           (or (cdr (assq len '((1 . font-lock-function-name-face)
691                                (2 . font-lock-keyword-face)
692                                (3 . font-lock-comment-face))))
693               font-lock-variable-name-face))
694         nil t))
695     ;; Highlight citations of the form [1] and [Mar94].
696     ("\\[\\([A-Z][A-Za-z]+\\)*[0-9]+\\]" . font-lock-type-face))
697   "Additional expressions to highlight in Outline mode.")
698
699 (add-hook 'outline-mode-hook
700           '(lambda ()
701             (setq font-lock-maximum-decoration t)
702             (setq font-lock-maximum-decoration t)
703             (make-local-variable 'font-lock-defaults)
704             (setq font-lock-defaults '(outline-font-lock-keywords t))
705             (font-lock-mode global-font-lock-mode)
706         ))
707  
708 (require 'allout)
709 (outline-init 't)