X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fbook.cc;h=e1fdef644dfdca3fe25af5705be47d3050b7420b;hb=74e906db27770282e2d3c180298e5968ebff9360;hp=efd26d44ebb6fe452b3cfe8a9af3cf4360b12db6;hpb=1c122290caffd067b81c60a18c97e61d1c6b209e;p=lilypond.git diff --git a/lily/book.cc b/lily/book.cc index efd26d44eb..e1fdef644d 100644 --- a/lily/book.cc +++ b/lily/book.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1997--2010 Han-Wen Nienhuys + Copyright (C) 1997--2011 Han-Wen Nienhuys 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_;