Those are fairly cosmetic changes (partly comments) to prepare for the
possibility of using override/revert with numeric subkeys while
retaining the necessity of using a symbol as the main property in a
Context.Grob.property.subproperties... n-tuple since the organization of
an "nalist" (an alist stack containing reversible subproperty overrides)
relies on a few special key values: currently pairs and booleans are
specially interpreted while the current implementation requires an
eq?-comparable first index for efficiency reasons.
SCM grob_property_path,
SCM new_value)
{
SCM grob_property_path,
SCM new_value)
{
+ // Numbers may appear, but not in first place
if (!scm_is_symbol (context_property)
|| !scm_is_symbol (scm_car (grob_property_path)))
{
if (!scm_is_symbol (context_property)
|| !scm_is_symbol (scm_car (grob_property_path)))
{
- warning (_ ("need symbol arguments for \\override and \\revert"));
+ warning (_ ("need symbol argument for \\override and \\revert"));
if (do_internal_type_checking_global)
assert (false);
}
if (do_internal_type_checking_global)
assert (false);
}
// This converts an alist with nested overrides in it to a proper
// alist. The number of nested overrides is known in advance,
// everything up to the last nested override is copied, the tail is
// This converts an alist with nested overrides in it to a proper
// alist. The number of nested overrides is known in advance,
// everything up to the last nested override is copied, the tail is
+// shared.
+//
+// The first nalist index has to be a symbol since the conversion
+// relies on eq? comparisons, uses some special non-symbol values for
+// special purposes, and does validity checking indexed by symbols.
+// Subindexing can be done with equal?-comparable indexes, however.
SCM
nalist_to_alist (SCM nalist, int nested)
SCM
nalist_to_alist (SCM nalist, int nested)
scm_set_cdr_x (pair, scm_cons (elt, scm_cdr (pair)));
continue;
}
scm_set_cdr_x (pair, scm_cons (elt, scm_cdr (pair)));
continue;
}
+ assert (scm_is_symbol (key));
// plain override: apply any known corresponding partials
SCM pair = assq_pop_x (key, &partials);
if (scm_is_true (pair))
// plain override: apply any known corresponding partials
SCM pair = assq_pop_x (key, &partials);
if (scm_is_true (pair))