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