--- bash-2.04/execute_cmd.c.shellfunc Tue Jan 25 11:29:11 2000 +++ bash-2.04/execute_cmd.c Tue May 2 21:26:24 2000 @@ -2855,6 +2855,7 @@ int return_val, result; COMMAND *tc, *fc; char *debug_trap, *error_trap; + SHELL_VAR* old_shell_function; USE_VAR(fc); @@ -2862,6 +2862,8 @@ if (tc && (flags & CMD_IGNORE_RETURN)) tc->flags |= CMD_IGNORE_RETURN; + old_shell_function = this_shell_function; + if (subshell == 0) { begin_unwind_frame ("function_calling"); @@ -2959,6 +2959,8 @@ if (variable_context == 0 || this_shell_function == 0) make_funcname_visible (0); + + this_shell_function = old_shell_function; return (result); }