Index: lily/context-scheme.cc |
diff --git a/lily/context-scheme.cc b/lily/context-scheme.cc |
index feda0f607eab62fffb45c2d770277b12114e814d..35213843f9f5799c844f2b3e68a78a2d44e083ff 100644 |
--- a/lily/context-scheme.cc |
+++ b/lily/context-scheme.cc |
@@ -187,15 +187,8 @@ LY_DEFINE (ly_context_find, "ly:context-find", |
LY_ASSERT_SMOB (Context, context, 1); |
LY_ASSERT_TYPE (ly_is_symbol, name, 2); |
Context *tr = unsmob<Context> (context); |
- |
- while (tr) |
- { |
- if (tr->is_alias (name)) |
- return tr->self_scm (); |
- tr = tr->get_parent_context (); |
- } |
- |
- return SCM_BOOL_F; |
+ tr = find_context_above (tr, name); |
+ return tr ? tr->self_scm () : SCM_BOOL_F; |
} |
LY_DEFINE (ly_context_now, "ly:context-now", |