]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/book.cc
Fix typo in warning message
[lilypond.git] / lily / book.cc
index efd26d44ebb6fe452b3cfe8a9af3cf4360b12db6..e1fdef644dfdca3fe25af5705be47d3050b7420b 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1997--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 1997--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -67,15 +67,21 @@ Book::Book (Book const &s)
   header_ = ly_make_module (false);
   if (ly_is_module (s.header_))
     ly_module_copy (header_, s.header_);
-
   SCM *t = &scores_;
   for (SCM p = s.scores_; scm_is_pair (p); p = scm_cdr (p))
     {
-      Score *newscore = unsmob_score (scm_car (p))->clone ();
+      SCM entry = scm_car (p);
 
-      *t = scm_cons (newscore->self_scm (), SCM_EOL);
+      if (Score *newscore = unsmob_score (entry))
+       *t = scm_cons (newscore->clone ()->unprotect (), SCM_EOL);
+      else if (Page_marker *marker = unsmob_page_marker (entry))
+       *t = scm_cons (marker->clone ()->unprotect (), SCM_EOL);
+      else
+       {
+         /* This entry is a markup list */
+         *t = scm_cons (entry, SCM_EOL);
+       }
       t = SCM_CDRLOC (*t);
-      newscore->unprotect ();
     }
 
   t = &bookparts_;