changeset 7750:5c6c6f4803c8

make eval('script') to work again
author John W. Eaton <jwe@octave.org>
date Sat, 03 May 2008 22:07:26 -0400
parents 14e05160b99f
children 7c020c067a60
files src/ChangeLog src/parse.y
diffstat 2 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu May 01 17:25:56 2008 -0400
+++ b/src/ChangeLog	Sat May 03 22:07:26 2008 -0400
@@ -1,3 +1,8 @@
+2008-05-03  John W. Eaton  <jwe@octave.org>
+
+	* parse.y (parse_fcn_file): Also temporarily set parser_end_of_input
+	and get_input_from_eval_string to false while reading script files.
+
 2008-05-01  John W. Eaton  <jwe@octave.org>
 
 	* parse.y (load_fcn_from_file): Expect
--- a/src/parse.y	Thu May 01 17:25:56 2008 -0400
+++ b/src/parse.y	Sat May 03 22:07:26 2008 -0400
@@ -3033,19 +3033,21 @@
 
 	  bool parsing_script = false;
 
+	  unwind_protect_bool (get_input_from_eval_string);
+	  unwind_protect_bool (parser_end_of_input);
+
+	  get_input_from_eval_string = false;
+	  parser_end_of_input = false;
+
 	  if (! force_script && looking_at_function_keyword (ffile))
 	    {
 	      file_type = "function";
 
 	      unwind_protect_int (Vecho_executing_commands);
 	      unwind_protect_bool (reading_fcn_file);
-	      unwind_protect_bool (get_input_from_eval_string);
-	      unwind_protect_bool (parser_end_of_input);
 
 	      Vecho_executing_commands = ECHO_OFF;
 	      reading_fcn_file = true;
-	      get_input_from_eval_string = false;
-	      parser_end_of_input = false;
 	    }
 	  else
 	    {