]> git.donarmstrong.com Git - lilypond.git/commitdiff
* ly/engraver-init.ly: add Rest_engraver only once.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 15 Aug 2005 18:28:41 +0000 (18:28 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 15 Aug 2005 18:28:41 +0000 (18:28 +0000)
* scm/define-music-display-methods.scm (KeyChangeEvent): only do
(*parser*) lookup if (*parser*) != #f.

ChangeLog
input/regression/display-lily-tests.ly
input/regression/tuplet-full-length.ly
lily/parser.yy
lily/smobs.cc
ly/engraver-init.ly
scm/define-music-display-methods.scm
scm/lily.scm

index a3fa9961b97bf49a183d703a594758310909320a..7f8807dae1693b910507f07767b71705da4d574e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-08-15  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * ly/engraver-init.ly: add Rest_engraver only once.
+
+       * scm/define-music-display-methods.scm (KeyChangeEvent): only do
+       (*parser*) lookup if (*parser*) != #f.
+
 2005-08-15  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * input/regression/slur-script.ly: Add example of reverting
index 369e338fda94362ace057afe92ccb3a7365d29f7..81f72cfb2d7a8c48fb8f0c480ae041c3cb918c11 100644 (file)
@@ -29,7 +29,6 @@
 
 #(read-hash-extend #\[ my-read-lily-expression)
 
-#(display-lily-init parser)
 #(define test-number 0)
   
 #(define (lily-string->markup str)
index ae206c677a756317c84eff9911544d03d90ad3af..28dd010a09fab421ab31666358b8771050dfa275 100644 (file)
@@ -10,7 +10,7 @@ start of the next non-tuplet note.  "
 \paper { raggedright = ##t
 indent = 0.0 }
 
-\new Voice \with {
+\relative c'' \new Voice \with {
   \remove  Forbid_line_break_engraver
   allowBeamBreak = ##t
 }
index 5662c99439d3fe89088d8a654e0b5077a95db4ee..3b72ec290b2d4674412423b4bfd87c362f3f08ac 100644 (file)
@@ -1779,7 +1779,6 @@ command_element:
                SCM proc = ly_lily_module_constant ("make-mark-set");
 
                SCM result = scm_call_1 (proc, $2);
-               scm_gc_protect_object (result);
                $$ = unsmob_music (result);
                $$->protect ();
        }
index e984567be520ed5663c4bad95f44777896e7a251..57de04c09f259f87a9d8da202b8c6e378f97e463 100644 (file)
@@ -8,6 +8,9 @@
 
 #include "smobs.hh"
 
+/*
+  The CDR contains the actual protected list.
+ */
 static SCM smob_protection_list;
 
 void
@@ -18,6 +21,16 @@ init_smob_protection ()
 }
 ADD_SCM_INIT_FUNC (init_smob_protection, init_smob_protection);
 
+LY_DEFINE(ly_smob_protects, "ly:smob-protects",
+         0,0,0, (),
+         "Return lily's internal smob protection list")
+{
+  return scm_cdr (smob_protection_list);
+}
+
+         
+         
+
 void
 protect_smob (SCM smob, SCM *prot_cons)
 {
index 4189c9aca3978cb09b4838c4efc5db4145430774..13f67e2b9fb1861b909686fb0a359bce29ad284c 100644 (file)
@@ -243,7 +243,6 @@ contained staves are not connected vertically."
   \remove "Glissando_engraver"
   \remove "Ligature_bracket_engraver"
   \remove "Note_heads_engraver"
-  \consists "Rest_engraver"
   \consists "Drum_notes_engraver"
   \remove "New_fingering_engraver"
 
index ea49d5361320d2b2f3e8a1783a19c0cc0a7dffd9..c6ee2298215fac6b73e41debdef60ee67d4937b0 100644 (file)
@@ -561,7 +561,8 @@ Otherwise, return #f."
          (format #f "\\key ~a \\~a~a"
                  (note-name->lily-string (ly:music-property key 'tonic))
                  (any (lambda (mode)
-                        (if (equal? (ly:parser-lookup (*parser*) mode) c-pitch-alist)
+                        (if (and (*parser*)
+                                 (equal? (ly:parser-lookup (*parser*) mode) c-pitch-alist))
                             (symbol->string mode)
                             #f))
                       '(major minor ionian locrian aeolian mixolydian lydian phrygian dorian))
index c91fcb2b888a651d56fa2f00e0857a89ceced355..cc899a67b3d60f219a9bc241bd37c656e16b702d 100644 (file)
@@ -316,20 +316,24 @@ The syntax is the same as `define*-public'."
 
     (display (format "Dumping gc protected objs to ~a...\n" out-file-name))
     (display
-     (filter
-      (lambda (x) (not (symbol? x))) 
-      (map (lambda (y)
-            (let ((x (car y))
-                  (c (cdr y)))
-
-              (string-append
-               (string-join
-                (map object->string (list (object-address x) c x))
-                " ")
-               "\n")))
+     (map (lambda (y)
+           (let ((x (car y))
+                 (c (cdr y)))
+             
+             (string-append
+              (string-join
+               (map object->string (list (object-address x) c x))
+               " ")
+              "\n")))
+
+         (filter
+          (lambda (x)
+            (not (symbol? (car x))))
           protects))
      outfile)
 
+;    (display (ly:smob-protects))
+    (newline outfile)
     (if (defined? 'gc-live-object-stats)
        (let* ((stats #f))
          (display "Live object statistics: GC'ing\n")
@@ -375,17 +379,17 @@ The syntax is the same as `define*-public'."
     (for-each
      (lambda (x)
        (lilypond-file handler x)
-       (ly:clear-anonymous-modules))
+       (ly:clear-anonymous-modules)
+       (if (ly:get-option 'debug-gc)
+          (dump-gc-protects)))
+     
      files)
     failed))
 
 (define (lilypond-file handler file-name)
   (catch 'ly-file-failed
         (lambda () (ly:parse-file file-name))
-        (lambda (x . args) (handler x file-name)))
-
-  (if (ly:get-option 'debug-gc)
-      (dump-gc-protects)))
+        (lambda (x . args) (handler x file-name))))
 
 (use-modules (scm editor))