]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/hara-kiri-group-spanner.cc
Run grand replace for 2015.
[lilypond.git] / lily / hara-kiri-group-spanner.cc
index b7c55b5045f903b0b22ec46c3b5cd10a707b0dc5..a682a0aa6da887c63333c630c44cfa72b280232d 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1998--2014 Jan Nieuwenhuizen <janneke@gnu.org>
+  Copyright (C) 1998--2015 Jan Nieuwenhuizen <janneke@gnu.org>
   Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
@@ -77,6 +77,11 @@ bool find_in_range (SCM vector, int low, int hi, int min, int max)
 bool
 Hara_kiri_group_spanner::request_suicide (Grob *me, int start, int end)
 {
+  extract_grob_set (me, "make-dead-when", foes);
+  for (vsize i = 0; i < foes.size (); i++)
+    if (foes[i]->is_live () && !request_suicide_alone (foes[i], start, end))
+      return true;
+
   if (!request_suicide_alone (me, start, end))
     return false;
 
@@ -185,13 +190,16 @@ Hara_kiri_group_spanner::add_interesting_item (Grob *me, Grob *n)
 ADD_INTERFACE (Hara_kiri_group_spanner,
                "A group spanner that keeps track of interesting items.  If it"
                " doesn't contain any after line breaking, it removes itself"
-               " and all its children.",
+               " and all its children.  Children may be prioritized in layers"
+               " via @code{remove-layer}, in which case only the"
+               " lowest-numbered non-empty layer is retained.",
 
                /* properties */
                "items-worth-living "
                "important-column-ranks "
                "keep-alive-with "
+               "make-dead-when "
                "remove-empty "
                "remove-first "
+               "remove-layer "
               );
-