texinfo-commits
[Top][All Lists]
Advanced

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

[7169] parsetexi alias


From: gavinsmith0123
Subject: [7169] parsetexi alias
Date: Sat, 14 May 2016 20:14:32 +0000 (UTC)

Revision: 7169
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7169
Author:   gavin
Date:     2016-05-14 20:14:31 +0000 (Sat, 14 May 2016)
Log Message:
-----------
parsetexi alias

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

Modified: trunk/tp/parsetexi/end_line.c
===================================================================
--- trunk/tp/parsetexi/end_line.c       2016-05-14 17:34:52 UTC (rev 7168)
+++ trunk/tp/parsetexi/end_line.c       2016-05-14 20:14:31 UTC (rev 7169)
@@ -302,8 +302,6 @@
         char *new = 0, *existing = 0;
         enum command_id new_cmd, existing_cmd;
 
-        if (!isalnum (*line)) /* This stops e.g. "@alias * = :" */
-          goto alias_invalid;
         new = read_command_name (&line);
         if (!new)
           goto alias_invalid;
@@ -320,12 +318,21 @@
         if (!existing)
           goto alias_invalid;
 
+        if (*line)
+          goto alias_invalid; /* Trailing argument. */
+
         ADD_ARG(new);
         ADD_ARG(existing);
 
         existing_cmd = lookup_command (existing);
         if (!existing_cmd)
           break; /* TODO: Error message */
+        else
+          {
+            if (command_data(existing_cmd).flags & CF_block)
+              line_warn ("environment command %s as argument to @alias",
+                         command_name(existing_cmd));
+          }
 
         /* Remember the alias. */
         new_cmd = add_texinfo_command (new);




reply via email to

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