diff options
Diffstat (limited to 'expand.c')
-rw-r--r-- | expand.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -113,11 +113,18 @@ recursively_expand_for_file (struct variable *v, struct file *file) expanding_var = &this_var; } + /* If we have no other file-reading context, use the variable's context. */ + if (!reading_file) + { + set_reading = 1; + reading_file = &v->fileinfo; + } + if (v->expanding) { if (!v->exp_count) /* Expanding V causes infinite recursion. Lose. */ - fatal (this_var, + fatal (*expanding_var, _("Recursive variable `%s' references itself (eventually)"), v->name); --v->exp_count; @@ -129,13 +136,6 @@ recursively_expand_for_file (struct variable *v, struct file *file) current_variable_set_list = file->variables; } - /* If we have no other file-reading context, use the variable's context. */ - if (!reading_file) - { - set_reading = 1; - reading_file = this_var; - } - v->expanding = 1; if (v->append) value = allocated_variable_append (v); |