texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: No @-commands in file names except for @@, @{ and


From: Patrice Dumas
Subject: branch master updated: No @-commands in file names except for @@, @{ and @}
Date: Sun, 24 Jul 2022 14:08:56 -0400

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

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 2db93404d2 No @-commands in file names except for @@, @{ and @}
2db93404d2 is described below

commit 2db93404d2db8d673ccd9d8809fb0f6096ecd5fc
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Jul 24 20:08:45 2022 +0200

    No @-commands in file names except for @@, @{ and @}
    
    * doc/texinfo.texi (@code{@@setfilename}, Using Include Files)
    (@code{@@verbatiminclude}): document that @value and @@, @{, @}
    and associated @-commands such as @atchar are the only @-commands
    allowed on @setfilename, @include and @verbatiminclude lines.
---
 ChangeLog                 |  9 +++++++++
 doc/texinfo.texi          | 21 +++++++++++++++------
 tp/Texinfo/ParserNonXS.pm |  6 +++---
 3 files changed, 27 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 23af39be3c..1e31f4d822 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2022-07-24  Patrice Dumas  <pertusus@free.fr>
+
+       No @-commands in file names except for @@, @{ and @}
+
+       * doc/texinfo.texi (@code{@@setfilename}, Using Include Files)
+       (@code{@@verbatiminclude}): document that @value and @@, @{, @}
+       and associated @-commands such as @atchar are the only @-commands
+       allowed on @setfilename, @include and @verbatiminclude lines.
+
 2022-07-24  Patrice Dumas  <pertusus@free.fr>
 
        * NEWS, tp/Texinfo/Convert/DocBook.pm (_convert),
diff --git a/doc/texinfo.texi b/doc/texinfo.texi
index 676900ea25..8d6bbf79e2 100644
--- a/doc/texinfo.texi
+++ b/doc/texinfo.texi
@@ -1750,6 +1750,10 @@ final extension with the output format-specific 
extension (@samp{html}
 when generating HTML, for example), or add a dot followed by the
 extension (@samp{.html} for HTML) if the given name has no extension.
 
+@@-commands are not allowed in @code{@@setfilename}, except for
+@code{@@@@}, @code{@@@{}, @code{@@@}} and associated @@-commands
+such as @code{@@atchar@{@}}.
+
 @code{@@setfilename} used to be required by the Texinfo processors
 and some other programs.  This should not be the case any more;
 @code{@@setfilename} can be omitted.  If the Texinfo input is
@@ -14273,9 +14277,10 @@ the same line by the name of a file to be included.  
For example:
 @@include buffers.texi
 @end example
 
-@@-commands are expanded in file names.  The one most likely to be
-useful is @code{@@value} (@pxref{@code{@@set @@value}}), and even then
-only in complicated situations.
+@code{@@value@{@var{var}@}} references are expanded on the @code{@@include}
+line.  Other than that, the only @@-commands allowed are @code{@@@@},
+@code{@@@{}, @code{@@@}} and associated @@-commands such as
+@code{@@atchar@{@}}.
 
 An included file should simply be a segment of text that you expect to
 be included as is into the overall or @dfn{outer} Texinfo file; it
@@ -14377,9 +14382,9 @@ indentation is added; if you want indentation, enclose 
the
 @code{@@verbatiminclude} within @code{@@example}
 (@pxref{@code{@@example}}).
 
-The name of the file is taken literally, with a single exception:
-@code{@@value@{@var{var}@}} references are expanded.  This makes it
-possible to include files in other directories within a distribution,
+@code{@@value@{@var{var}@}} references are expanded on the
+@code{@@verbatiminclude} line.  This makes it possible to
+include files in other directories within a distribution,
 for instance:
 
 @example
@@ -14389,6 +14394,10 @@ for instance:
 @noindent (You still have to get @code{top_srcdir} defined in the
 first place.)
 
+Other than that, the only @@-commands allowed are @code{@@@@},
+@code{@@@{}, @code{@@@}} and associated @@-commands such as
+@code{@@atchar@{@}}.
+
 For a method on printing the file contents in a smaller font size, see
 the end of the section on @code{@@verbatim}.
 
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index fa42797f98..a4b36101f8 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -2777,7 +2777,7 @@ sub _convert_to_text {
       $superfluous_arg = 1;
     }
   }
-  return ($text,  $superfluous_arg);
+  return ($text, $superfluous_arg);
 }
 
 # close constructs and do stuff at end of line (or end of the document)
@@ -3229,7 +3229,7 @@ sub _end_line($$$)
       $current->{'extra'}->{'misc_args'} = $args if (defined($args));
     } elsif ($self->{'line_commands'}->{$command} eq 'text') {
       my ($text, $superfluous_arg)
-        = _convert_to_text ($current->{'args'}->[0]);
+        = _convert_to_text($current->{'args'}->[0]);
 
       if ($text eq '') {
         if (not $superfluous_arg) {
@@ -3283,7 +3283,7 @@ sub _end_line($$$)
                               $command, $line);
           }
         } elsif ($superfluous_arg) {
-          # An error message is issued below.
+          # @-command effects are ignored, an error message is issued below.
         } elsif ($command eq 'include') {
           # We want Perl binary strings representing sequences of bytes,
           # not character strings of codepoints in the internal perl encoding.



reply via email to

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