* repeat.c (parse_lines): Issue an error when attempting to nest
authorBen Pfaff <blp@gnu.org>
Sun, 10 Dec 2006 04:12:40 +0000 (04:12 +0000)
committerBen Pfaff <blp@gnu.org>
Sun, 10 Dec 2006 04:12:40 +0000 (04:12 +0000)
DO REPEAT in compatibility mode.

src/language/control/ChangeLog
src/language/control/repeat.c

index ef5f63a4f1606eb8bbe2484e7d67fe27afa14a1e..2e38bb6f3d3d9cb348a2345dbbb15cf708181d54 100644 (file)
@@ -1,3 +1,8 @@
+Sat Dec  9 20:12:34 2006  Ben Pfaff  <blp@gnu.org>
+
+       * repeat.c (parse_lines): Issue an error when attempting to nest
+       DO REPEAT in compatibility mode.
+
 Sat Dec  2 17:01:59 2006  Ben Pfaff  <blp@gnu.org>
 
        Significant cleanup to DO REPEAT.
index 286cc347098e397c40ce587b346ab5922d494a2e..5a1ad08ddb743ba2a0e2e99674757eb791d4beea 100644 (file)
@@ -328,8 +328,13 @@ parse_lines (struct lexer *lexer, struct repeat_block *block)
       lex_preprocess_line (&text, syntax,
                            &command_ends_before_line,
                            &command_ends_after_line);
-      if (recognize_do_repeat (ds_ss (&text)))
-        nesting_level++;
+      if (recognize_do_repeat (ds_ss (&text))) 
+        {
+          if (get_syntax () == COMPATIBLE)
+            msg (SE, _("DO REPEAT may not nest in compatibility mode."));
+          else
+            nesting_level++; 
+        }
       else if (recognize_end_repeat (ds_ss (&text), &block->print)
                && nesting_level-- == 0)
         {