Thomas Morley <thomasmorle...@gmail.com> writes: > 2018-02-03 22:31 GMT+01:00 David Kastrup <d...@gnu.org>: > >>>>> >>>>> Processing the derived minimal below >>>>> >>>>> \markup bold-red = \markup \bold \with-color #red \etc >>>>> \markup \bold-red "Bold red." >>>>> > >>>>> GNU LilyPond 2.21.0 >>>>> Processing `atest-70.ly' >>>>> Parsing...Backtrace: >>>>> 9 (apply-smob/1 #<catch-closure 20fd8c0>) >>>>> In ice-9/eval.scm: >>>>> 293:34 8 (_ #(#(#<directory (lily) 21b6f00>) #<variable 2efde6…>)) >>>>> 619:8 7 (_ #(#(#(#(#(#(#(#<directory (lily) …>) …) …) …) …) …) …)) >>>>> In srfi/srfi-1.scm: >>>>> 640:9 6 (for-each #<procedure 31f7760 at ice-9/eval.scm:333:13…> …) >>>>> In ice-9/eval.scm: >>>>> 619:8 5 (_ #(#(#(#(#(#<directory (lily) 21b6f00> # …) …) …) …) …)) >>>>> In ice-9/boot-9.scm: >>>>> 829:9 4 (catch _ _ #<procedure 3402640 at ice-9/eval.scm:386:1…> …) >>>>> In unknown file: >>>>> 3 (ly:parse-file "atest-70.ly") >>>>> In ice-9/eval.scm: >>>>> 196:35 2 (_ #f) >>>>> 223:20 1 (proc #<module (#{ g166}#) 2825f00>) >>>>> In unknown file: >>>>> 0 (%resolve-variable (7 . bold-red) #<module (#{ g166}#) …>) >>>>> >>>>> ERROR: In procedure %resolve-variable: >>>>> Unbound variable: bold-red > >> >> What happens if you use only the first line of your mini regtest, namely >> >> \markup bold-red = \markup \bold \with-color #red \etc >> >> and stop without actually using this? > > Same as before (if I read correctly), i.e. > > GNU LilyPond 2.21.0 > Processing `atest-70.ly' > Parsing...Backtrace: > 9 (apply-smob/1 #<catch-closure e458c0>) > In ice-9/eval.scm: > 293:34 8 (_ #(#(#<directory (lily) efef00>) #<variable 1350480…>)) > 619:8 7 (_ #(#(#(#(#(#(#(#<directory (lily) …>) …) …) …) …) …) …)) > In srfi/srfi-1.scm: > 640:9 6 (for-each #<procedure 16cc400 at ice-9/eval.scm:333:13…> …) > In ice-9/eval.scm: > 619:8 5 (_ #(#(#(#(#(#<directory (lily) efef00> #f …) …) …) …) …)) > In ice-9/boot-9.scm: > 829:9 4 (catch _ _ #<procedure 2001600 at ice-9/eval.scm:386:1…> …) > In unknown file: > 3 (ly:parse-file "atest-70.ly") > In ice-9/eval.scm: > 196:35 2 (_ #f) > 223:20 1 (proc #<module (#{ g166}#) 148df00>) > In unknown file: > 0 (%resolve-variable (7 . bold-red) #<module (#{ g166}#) …>) > > ERROR: In procedure %resolve-variable: > Unbound variable: bold-red
Ok, then it's the primitive-eval crapping out. parser.yy has | markup_mode_word '=' identifier_init { if (scm_is_false (Lily::markup_function_p ($3))) { parser->parser_error (@3, _ ("Not a markup function")); } else { scm_primitive_eval (scm_list_3 (Lily::define_markup_command, scm_string_to_symbol ($1), ly_quote_scm ($3))); } $$ = SCM_UNSPECIFIED; } ; So basically #(primitive-eval (list define-markup-command 'bold-red #{ \markup \bold \with-color #red \etc #})) should throw the same error, correct? -- David Kastrup _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel