- /*
- Make sure they're in order of user input by adding index i.
- Don't use the direction in this priority. Smaller means closer
- to the head.
- */
- prio += index;
+ for (SCM s = art; scm_is_pair (s); s = scm_cdr (s))
+ {
+ SCM sym = scm_caar (s);
+ SCM type = scm_object_property (sym, ly_symbol2scm ("backend-type?"));
+ if (!ly_is_procedure (type))
+ continue;
+
+ SCM val = scm_cdar (s);
+
+ if (sym == ly_symbol2scm ("script-priority"))
+ {
+ priority_found = true;
+ /* Make sure they're in order of user input by adding index i.
+ Don't use the direction in this priority. Smaller means closer
+ to the head. */
+ int prio = scm_to_int (val) + index;
+
+ val = scm_from_int (prio);
+ }
+
+ SCM preset = p->get_property_data (sym);
+ if (val == SCM_EOL
+ || scm_call_1 (type, preset) == SCM_BOOL_F)
+ p->set_property (sym, val);
+ }