changeset 8637:4385bb503467

pt-stmt.cc (tree_statemnt::eval): check in_function_of_script_body to decide whether to call octave_call_stack::set_statement
author John W. Eaton <jwe@octave.org>
date Thu, 29 Jan 2009 18:13:06 -0500
parents ee70d438a5b4
children 20e93feaa7f8
files src/ChangeLog src/pt-stmt.cc
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
 2009-01-29  John W. Eaton  <jwe@octave.org>
 
+	* pt-stmt.cc (tree_statement::eval): Check
+	in_function_or_script_body instead of symbol_table::at_top_level ()
+	to decide whether to call octave_call_stack::set_statement.
+
 	* graphics.cc (properties::set_defaults): Also set
 	horizontalalignment, verticalalignmnt, and rotation properties for
 	new label objects here.
--- a/src/pt-stmt.cc
+++ b/src/pt-stmt.cc
@@ -89,7 +89,7 @@
 
   if (cmd || expr)
     {
-      if (! symbol_table::at_top_level ())
+      if (in_function_or_script_body)
 	octave_call_stack::set_statement (this);
 
       maybe_echo_code (in_function_or_script_body);