texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: No space for @ def line continuation


From: Gavin D. Smith
Subject: branch master updated: No space for @ def line continuation
Date: Wed, 12 Jul 2023 12:40:05 -0400

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 e851b20968 No space for @ def line continuation
e851b20968 is described below

commit e851b20968fa769462f440e770cf04478ce092e0
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Wed Jul 12 17:39:54 2023 +0100

    No space for @ def line continuation
    
    * doc/texinfo.texi (\argremovespace): Remove macro handling
    @(newline).  This should only occur in line arguments on @def*
    lines and we do not need the complicated handling of it generally.
    Handling @(newline) in here makes it very hard to make any changes
    that just affect @def*.
    (\argremovespace): Reinstate definition from 2003-11-22 to handle
    stripping a space token from the end of an argument, which is
    simpler and all that is needed for most calls.
    (\printname, \defunargs): Make @<newline> sequence expand to
    nothing.  This matches the behaviour of texi2any.
    
    bug-texinfo discussion, 7 Apr 2023.
---
 ChangeLog       | 17 +++++++++++++++++
 doc/texinfo.tex | 46 ++++++++++++++--------------------------------
 2 files changed, 31 insertions(+), 32 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d966ebf41f..a415fe7bd2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2023-07-12  Gavin Smith <gavinsmith0123@gmail.com>
+
+       No space for @ def line continuation
+
+       * doc/texinfo.texi (\argremovespace): Remove macro handling
+       @(newline).  This should only occur in line arguments on @def*
+       lines and we do not need the complicated handling of it generally.
+       Handling @(newline) in here makes it very hard to make any changes
+       that just affect @def*.
+       (\argremovespace): Reinstate definition from 2003-11-22 to handle
+       stripping a space token from the end of an argument, which is
+       simpler and all that is needed for most calls.
+       (\printname, \defunargs): Make @<newline> sequence expand to
+       nothing.  This matches the behaviour of texi2any.
+
+       bug-texinfo discussion, 7 Apr 2023.
+
 2023-07-12  Gavin Smith <gavinsmith0123@gmail.com>
 
        XS file copyright notices
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index 9e44ddc591..8615f677d9 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2023-07-02.10}
+\def\texinfoversion{2023-07-12.13}
 %
 % Copyright 1985, 1986, 1988, 1990-2023 Free Software Foundation, Inc.
 %
@@ -426,42 +426,21 @@
 }
 
 % First remove any @comment, then any @c comment.  Pass the result on to 
-% \argcheckspaces.
+% \argremovespace.
 \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
-\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
-
-% Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
-%
-% \argremovec might leave us with trailing space, e.g.,
+\def\argremovec#1\c#2\ArgTerm{\argremovespace#1$ $\ArgTerm}
+% \argremovec might leave us with trailing space, though; e.g.,
 %    @end itemize  @c foo
-% This space token undergoes the same procedure and is eventually removed
-% by \finishparsearg.
-%
-\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M}
-\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M}
-\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{%
-  \def\temp{#3}%
-  \ifx\temp\empty
-    % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
-    \let\temp\finishparsearg
-  \else
-    \let\temp\argcheckspaces
-  \fi
-  % Put the space token in:
-  \temp#1 #3\ArgTerm
-}
+% Note that the argument cannot contain the TeX $, as its catcode is
+% changed to \other when Texinfo source is read.
+\def\argremovespace#1 $#2\ArgTerm{\finishparsearg#1$\ArgTerm}
 
 % If a _delimited_ argument is enclosed in braces, they get stripped; so
 % to get _exactly_ the rest of the line, we had to prevent such situation.
-% We prepended an \empty token at the very beginning and we expand it now,
-% just before passing the control to \argtorun.
-% (Similarly, we have to think about #3 of \argcheckspacesY above: it is
-% either the null string, or it ends with \^^M---thus there is no danger
-% that a pair of braces would be stripped.
-%
-% But first, we have to remove the trailing space token.
-%
-\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
+% We prepended an \empty token at the very beginning and we expand it
+% just before passing the control to \next.
+% (But first, we have to remove the remaining $ or two.)
+\def\finishparsearg#1$#2\ArgTerm{\expandafter\argtorun\expandafter{#1}}
 
 
 % \parseargdef - define a command taking an argument on the line
@@ -7787,6 +7766,8 @@ might help (with 'rm \jobname.?? \jobname.??s')%
   \tolerance=10000 \hbadness=10000
   \exdentamount=\defbodyindent
   {%
+    \def\^^M{}% for line continuation
+    %
     % defun fonts. We use typewriter by default (used to be bold) because:
     % . we're printing identifiers, they should be in tt in principle.
     % . in languages with many accents, such as Czech or French, it's
@@ -7819,6 +7800,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
 % Print arguments.  Use slanted for @def*, typewriter for @deftype*.
 \def\defunargs#1{%
   \bgroup
+    \def\^^M{}% for line continuation
     \df \ifdoingtypefn \tt \else \sl \fi
     \ifflagclear{txicodevaristt}{}%
        {\def\var##1{{\setregularquotes \ttsl ##1}}}%



reply via email to

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