diff src/parse.y @ 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 ea9cb4d68dbf
line wrap: on
line diff
--- 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
 	    {