]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/paper-outputter-scheme.cc
(all-grob-descriptions): set thickness to
[lilypond.git] / lily / paper-outputter-scheme.cc
index 81d1fcd29a73c482414817e3d0ae7e29ca7e29ec..706ef0a1f7329009bebe6faf9e3aa5d37901fc31 100644 (file)
@@ -10,8 +10,6 @@
 #include "warn.hh"
 #include "stencil.hh"
 
-
-
 LY_DEFINE (ly_make_paper_outputter, "ly:make-paper-outputter",
           2, 0, 0, (SCM port, SCM format),
           "Create an outputter that evaluates within "
@@ -24,13 +22,19 @@ LY_DEFINE (ly_make_paper_outputter, "ly:make-paper-outputter",
 
   String f = ly_scm2string (format);
 
+  String output_name = "<unknown>";
+
+  SCM port_name = scm_port_filename (port);
+  if (scm_is_string (port_name))
+    output_name = ly_scm2string (port_name);
+
   message (_f ("Layout output to `%s'...",
-              ly_scm2string (scm_port_filename (port)).to_str0 ()));
+              output_name.to_str0 ()));
 
   progress_indication ("\n");
   Paper_outputter *po = new Paper_outputter (port, f);
 
-  scm_gc_unprotect_object (po->self_scm ());
+  po->unprotect ();
   return po->self_scm ();
 }