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