When checking for `utf-8-string', we must not include the "warning"
definitions (set at runtime) for backends without `utf-8-string'.
An additional check is therefore necessary in order to ignore module
variables bound to lambda expressions.
All of the stencil expression procedures defined in output-*.scm create
variable<->symbol bindings, and has_utf8_string should be true in these
cases. But the variable<->#f bindings should not count, because they
are set at runtime.
This commit adds an additional check to disclude the variable<->#f
bindings.
if (ly_is_module (mod))
{
SCM utf8_string = ly_module_lookup (mod, ly_symbol2scm ("utf-8-string"));
- if (utf8_string != SCM_BOOL_F)
+ /*
+ has_utf8_string should only be true when utf8_string is a
+ variable that is bound to a *named* procedure.
+ */
+ if (utf8_string != SCM_BOOL_F
+ && scm_procedure_name (SCM_VARIABLE_REF (utf8_string)) != SCM_BOOL_F)
has_utf8_string = true;
}