]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lexer.ll
Issue 5145/2: Allow $... to specify a markup command
[lilypond.git] / lily / lexer.ll
index 19f84616f36ca3d38179f397daddfb1291a1d9ab..21d2fc1acc16bc32cd224c1e0013fcf93151db4f 100644 (file)
@@ -417,6 +417,20 @@ BOM_UTF8   \357\273\277
 
        sval = eval_scm (sval, hi, '$');
 
+       if (YYSTATE == markup && ly_is_procedure (sval))
+       {
+               SCM sig = Lily::markup_command_signature (sval);
+               if (scm_is_true (sig))
+               {
+                       yylval = sval;
+                       int token = MARKUP_FUNCTION;
+                       if (scm_is_true (scm_object_property
+                                        (sval, ly_symbol2scm ("markup-list-command"))))
+                               token = MARKUP_LIST_FUNCTION;
+                       push_markup_predicates (sig);
+                       return token;
+               }
+       }
        int token = scan_scm_id (sval);
        if (!scm_is_eq (yylval, SCM_UNSPECIFIED))
                return token;