diff options
author | David Kastrup <dak@gnu.org> | 2013-09-14 21:12:38 +0200 |
---|---|---|
committer | David Kastrup <dak@gnu.org> | 2016-07-10 19:36:26 +0200 |
commit | be3f2841c224e88d36ecf0f809be60893c83471d (patch) | |
tree | 17c956fa8e0f13adc0709833ebed24eb4d7a057f /lily | |
parent | c06336caa1a35e3aae2abd5d3779d5c3902afda3 (diff) |
Issue 4911/1: \with #*unspecified* should be equivalent to \with { }
Diffstat (limited to 'lily')
-rw-r--r-- | lily/parser.yy | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lily/parser.yy b/lily/parser.yy index 52fe450b7d..3601ea8f6a 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -1511,7 +1511,10 @@ context_modification: if (unsmob<Context_mod> ($2)) $$ = $2; else { - parser->parser_error (@2, _ ("not a context mod")); + // let's permit \with #*unspecified* to go for + // an empty context mod + if (!scm_is_eq ($2, SCM_UNSPECIFIED)) + parser->parser_error (@2, _ ("not a context mod")); $$ = Context_mod ().smobbed_copy (); } } @@ -1570,18 +1573,15 @@ context_mod_list: unsmob<Context_mod> ($1)->add_context_mods (md->get_mods ()); } | context_mod_list context_mod_arg { - if (scm_is_eq ($2, SCM_UNSPECIFIED)) - ; - else if (unsmob<Music> ($2)) { + if (unsmob<Music> ($2)) { SCM proc = parser->lexer_->lookup_identifier ("context-mod-music-handler"); $2 = scm_call_1 (proc, $2); } if (unsmob<Context_mod> ($2)) unsmob<Context_mod> ($$)->add_context_mods (unsmob<Context_mod> ($2)->get_mods ()); - else { + else if (!scm_is_eq ($2, SCM_UNSPECIFIED)) parser->parser_error (@2, _ ("not a context mod")); - } } ; |