texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Reduce list of line commands that may occur other


From: Gavin D. Smith
Subject: branch master updated: Reduce list of line commands that may occur other than at line start
Date: Mon, 06 Feb 2023 13:36:53 -0500

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 41c6fd25de Reduce list of line commands that may occur other than at 
line start
41c6fd25de is described below

commit 41c6fd25de02aeae299bba8ca946c42513406bae
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Mon Feb 6 18:36:12 2023 +0000

    Reduce list of line commands that may occur other than at line start
    
    * tp/Texinfo/ParserNonXS.pm (%begin_line_commands):
    Include @sp, @verbatiminclude, @set, @clear, @vskip.
    * tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line):
    Likewise.
    * NEWS: Mention change for @set and @value, and better validity
    checking in general.
    * doc/texinfo.texi (@set @value): Do not say that @set can
    occur at the beginning of a line.
---
 ChangeLog                        | 13 +++++++++++++
 NEWS                             |  4 +++-
 doc/texinfo.texi                 |  3 +++
 tp/Texinfo/ParserNonXS.pm        |  7 ++-----
 tp/Texinfo/XS/parsetexi/parser.c |  6 ------
 5 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 30982ff9aa..4a6c621524 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2023-02-06  Gavin Smith <gavinsmith0123@gmail.com>
+
+       Reduce list of line commands that may occur other than at line start
+
+       * tp/Texinfo/ParserNonXS.pm (%begin_line_commands):
+       Include @sp, @verbatiminclude, @set, @clear, @vskip.
+       * tp/Texinfo/XS/parsetexi/parser.c (process_remaining_on_line):
+       Likewise.
+       * NEWS: Mention change for @set and @value, and better validity
+       checking in general.
+       * doc/texinfo.texi (@set @value): Do not say that @set can
+       occur at the beginning of a line.
+
 2023-02-05  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/parsetexi/macro.c (expand_macro_arguments): fix
diff --git a/NEWS b/NEWS
index 9612cac644..b46dbb05b0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,7 @@
 This NEWS file records noteworthy changes, very tersely.
 See the manual for detailed information.
 
-  Copyright 1992-2022 Free Software Foundation, Inc.
+  Copyright 1992-2023 Free Software Foundation, Inc.
 
   Copying and distribution of this file, with or without modification,
   are permitted in any medium without royalty provided the copyright
@@ -28,6 +28,8 @@ See the manual for detailed information.
     . menu leading text and menu separator in elements instead of attributes.
 
 * texi2dvi
+ . better validity checking of deeply nested commands
+ . @set and @clear should only appear at the start of a line
  . macro expansion with texi2any requires at least version 5.0 (only
    happens with --expand option or with very old texinfo.tex)
 
diff --git a/doc/texinfo.texi b/doc/texinfo.texi
index dab959e242..4aebcc7981 100644
--- a/doc/texinfo.texi
+++ b/doc/texinfo.texi
@@ -12957,8 +12957,11 @@ not @samp{-} or @samp{_} or others---they will work in 
some contexts,
 but not all, due to limitations in @TeX{}.
 
 The value is the remainder of the input line, and can contain anything.
+
+@ignore
 However, unlike most other commands which take the rest of the line as
 a value, @code{@@set} need not appear at the beginning of a line.
+@end ignore
 
 Write the @code{@@set} command like this:
 
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index b47d158578..b4317945a2 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -390,11 +390,8 @@ foreach my $no_paragraph_command (keys(%line_commands)) {
   $begin_line_commands{$no_paragraph_command} = 1;
 }
 
-# verbatiminclude is not said to begin at the beginning of the line
-# in the manual
-foreach my $not_begin_line_command ('comment', 'c', 'sp', 'columnfractions',
-                                 'item', 'verbatiminclude',
-                                 'set', 'clear', 'vskip', 'subentry') {
+foreach my $not_begin_line_command ('comment', 'c', 'columnfractions',
+                                 'item', 'subentry') {
   delete $begin_line_commands{$not_begin_line_command};
 }
 
diff --git a/tp/Texinfo/XS/parsetexi/parser.c b/tp/Texinfo/XS/parsetexi/parser.c
index 404d4c4729..9fa800b780 100644
--- a/tp/Texinfo/XS/parsetexi/parser.c
+++ b/tp/Texinfo/XS/parsetexi/parser.c
@@ -2011,7 +2011,6 @@ process_remaining_on_line (ELEMENT **current_inout, char 
**line_inout)
       def_line_continuation = (current_context() == ct_def
                                && cmd == CM_NEWLINE);
       /* warn on not appearing at line beginning */
-      /* TODO maybe have a command flag for "begin line commands" */
       if (!def_line_continuation
           && !abort_empty_line (&current, NULL)
           && ((cmd == CM_node || cmd == CM_bye)
@@ -2019,13 +2018,8 @@ process_remaining_on_line (ELEMENT **current_inout, char 
**line_inout)
               || ((command_data(cmd).flags & CF_line)
                   && cmd != CM_comment
                   && cmd != CM_c
-                  && cmd != CM_sp
                   && cmd != CM_columnfractions
                   && cmd != CM_item
-                  && cmd != CM_verbatiminclude
-                  && cmd != CM_set
-                  && cmd != CM_clear
-                  && cmd != CM_vskip)
                   && cmd != CM_subentry))
         {
           line_warn ("@%s should only appear at the beginning of a line", 



reply via email to

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