texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[7167] parsetexi update


From: gavinsmith0123
Subject: [7167] parsetexi update
Date: Sat, 14 May 2016 15:04:01 +0000 (UTC)

Revision: 7167
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7167
Author:   gavin
Date:     2016-05-14 15:04:01 +0000 (Sat, 14 May 2016)
Log Message:
-----------
parsetexi update

Modified Paths:
--------------
    trunk/tp/parsetexi/api.c
    trunk/tp/parsetexi/end_line.c
    trunk/tp/parsetexi/handle_commands.c

Modified: trunk/tp/parsetexi/api.c
===================================================================
--- trunk/tp/parsetexi/api.c    2016-05-14 12:13:14 UTC (rev 7166)
+++ trunk/tp/parsetexi/api.c    2016-05-14 15:04:01 UTC (rev 7167)
@@ -63,7 +63,7 @@
 void
 parse_file (char *filename)
 {
-  debug_output = 1;
+  debug_output = 0;
   parse_texi_file (filename);
 }
 

Modified: trunk/tp/parsetexi/end_line.c
===================================================================
--- trunk/tp/parsetexi/end_line.c       2016-05-14 12:13:14 UTC (rev 7166)
+++ trunk/tp/parsetexi/end_line.c       2016-05-14 15:04:01 UTC (rev 7167)
@@ -1114,15 +1114,18 @@
           else
             {
               ELEMENT *e = k->value;
-              if (!(command_flags(e) & CF_brace))
+              if (!(command_flags(e) & CF_brace)
+                  || (command_data(e->cmd).data == 0))
                 {
                   command_error (current,
                                  "command @%s not accepting argument in brace "
                                  "should not be on @%s line",
-                                 e->cmd,
+                                 command_name(e->cmd),
                                  command_name(current->cmd));
                   k->key = "";
                   k->type = extra_deleted;
+                  /* FIXME: Error message for accent commands is done
+                     elsewhere (3040). */
                 }
             }
         }
@@ -1170,13 +1173,22 @@
           KEY_PAIR *k = lookup_extra_key (current, "command_as_argument");
           if (k && k->value)
             {
-              char *s = (char *) k->value;
-              enum command_id cmd = lookup_command (s);
+              enum command_id cmd = k->value->cmd;
               if (cmd && (command_data(cmd).flags & CF_accent))
                 {
                   command_warn (current, "accent command address@hidden' "
-                                "not allowed as @%s argument", s,
+                                "not allowed as @%s argument",
+                                command_name(cmd),
                                 command_name(current->cmd));
+                  k->key = "";
+                  k->value = 0;
+                  k->type = extra_deleted;
+                  k = lookup_extra_key (current,
+                                        "block_command_line_contents");
+                  if (k)
+                    {
+                      k->key = ""; k->type = extra_deleted;
+                    }
                 }
             }
         }

Modified: trunk/tp/parsetexi/handle_commands.c
===================================================================
--- trunk/tp/parsetexi/handle_commands.c        2016-05-14 12:13:14 UTC (rev 
7166)
+++ trunk/tp/parsetexi/handle_commands.c        2016-05-14 15:04:01 UTC (rev 
7167)
@@ -349,7 +349,7 @@
                 }
               else
                 {
-                  line_error ("@%s not meaningful within address@hidden' 
block",
+                  line_error ("@%s not meaningful inside address@hidden' 
block",
                               command_name(cmd),
                               command_name(parent->cmd));
                 }
@@ -370,7 +370,7 @@
                 }
               else
                 {
-                  line_error ("@%s not meaningful within address@hidden' 
block",
+                  line_error ("@%s not meaningful inside address@hidden' 
block",
                               command_name(cmd),
                               command_name(parent->cmd));
                   current = begin_preformatted (current);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]