texinfo-commits
[Top][All Lists]
Advanced

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

[7894] parsetexi error messages for deprecated commands


From: gavinsmith0123
Subject: [7894] parsetexi error messages for deprecated commands
Date: Sat, 1 Jul 2017 17:47:38 -0400 (EDT)

Revision: 7894
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7894
Author:   gavin
Date:     2017-07-01 17:47:38 -0400 (Sat, 01 Jul 2017)
Log Message:
-----------
parsetexi error messages for deprecated commands

Modified Paths:
--------------
    trunk/tp/parsetexi/command_data.txt
    trunk/tp/parsetexi/parser.c

Modified: trunk/tp/parsetexi/command_data.txt
===================================================================
--- trunk/tp/parsetexi/command_data.txt 2017-07-01 20:39:24 UTC (rev 7893)
+++ trunk/tp/parsetexi/command_data.txt 2017-07-01 21:47:38 UTC (rev 7894)
@@ -71,8 +71,8 @@
 insertcopying                  misc,global             MISC_noarg
 clickstyle                     misc,global             MISC_special
 # more relevant in preamble
-setcontentsaftertitlepage      misc,global_unique              MISC_skipline
-setshortcontentsaftertitlepage misc,global_unique              MISC_skipline
+setcontentsaftertitlepage      misc,global_unique,deprecated   MISC_skipline
+setshortcontentsaftertitlepage misc,global_unique,deprecated   MISC_skipline
 documentencoding               misc,global     MISC_text
 novalidate                     misc,global_unique      MISC_skipline
 validatemenus                  misc,global_unique      1

Modified: trunk/tp/parsetexi/parser.c
===================================================================
--- trunk/tp/parsetexi/parser.c 2017-07-01 20:39:24 UTC (rev 7893)
+++ trunk/tp/parsetexi/parser.c 2017-07-01 21:47:38 UTC (rev 7894)
@@ -1294,7 +1294,24 @@
       /* Warn on deprecated command */
       if (command_data(cmd).flags & CF_deprecated)
         {
-          line_warn ("@%s is obsolete.", command_name(cmd));
+          char *msg = 0;
+          switch (cmd)
+            {
+            case CM_setcontentsaftertitlepage:
+              msg = "move your @contents command if you want the "
+                    "contents after the title page";
+              break;
+            case CM_setshortcontentsaftertitlepage:
+              msg = "move your @shortcontents and @contents command if "
+                    "you want the contents after the title page";
+              break;
+            }
+          if (!msg)
+            line_warn ("@%s is obsolete.", command_name(cmd));
+          else
+            line_warn ("@%s is obsolete; %s", command_name(cmd), msg);
+          /* note: will have to translate msg if string translation with
+             gettext is implemented */
         }
 
       /* warn on not appearing at line beginning 4226 */




reply via email to

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