]> git.donarmstrong.com Git - lilypond.git/commitdiff
fix -dsafe for files that switch safe-mode half way.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 4 Jan 2007 20:38:14 +0000 (21:38 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 4 Jan 2007 20:38:14 +0000 (21:38 +0100)
input/regression/safe.ly
lily/lexer.ll
lily/main.cc

index a04b1303cd79a5573ad3bceb534bc84785502c58..760d60faaf7315fe36ee5c85e29d522619c2fc06 100644 (file)
@@ -15,7 +15,7 @@
 }
 
 
-#(open-file "/tmp/safe-guile.scm" "r")
+#(open-file "/tmp/safe-guile.scm")
 
 \include "this-should-fail.ly"
 
index b89ce76cca117f1e8b92121c2e023a1187c62937..942c52244f182b22eb8d378ef4eda6bace590092 100644 (file)
@@ -570,7 +570,8 @@ BOM_UTF8    \357\273\277
 <*><<EOF>> {
        if (is_main_input_)
        {
-               is_main_input_ = false;
+               /* 2 = init.ly + current file. */ 
+               is_main_input_ = include_stack_.size () > 2;
                if (!close_input ())
                /* Returns YY_NULL */
                        yyterminate ();
index 7b2dfd29bb531bbe6860eddbb22299f498275bae..bf8132477b290b464f6585b2e864da13f5e2c7ca 100644 (file)
@@ -568,7 +568,6 @@ parse_argv (int argc, char **argv)
        case 's':
          init_scheme_variables
            += "(cons \'safe #t)\n";
-
          break;
        case 'p':
          make_preview = true;