From: Han-Wen Nienhuys Date: Tue, 11 Sep 2007 23:32:58 +0000 (+0200) Subject: Fix #457. X-Git-Tag: release/2.11.33-1~4^2~12^2~13 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=73d8c2b35d692409b1c59dbd5edee82e21018b99;p=lilypond.git Fix #457. Don't replace the head of the alist when executing an \override. The head may contain the value (set in the same context) to \revert to. --- diff --git a/lily/context-property.cc b/lily/context-property.cc index e025979291..5234d1113f 100644 --- a/lily/context-property.cc +++ b/lily/context-property.cc @@ -82,7 +82,6 @@ execute_override_property (Context *context, } SCM target_alist = scm_car (current_context_val); - SCM parent_alist = scm_cdr (current_context_val); SCM symbol = scm_car (grob_property_path); if (scm_is_pair (scm_cdr (grob_property_path))) @@ -93,11 +92,10 @@ execute_override_property (Context *context, new_value); } - if (scm_is_pair (target_alist) - && scm_caar (target_alist) == symbol - && target_alist != parent_alist) - target_alist = scm_cdr (target_alist); - + // it's tempting to replace the head of the list if it's the same + // property. However, we have to keep this info around, in case we have to + // \revert back to it. + target_alist = scm_acons (symbol, new_value, target_alist); bool ok = true;