texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Ease index files format change


From: Gavin D. Smith
Subject: branch master updated: Ease index files format change
Date: Mon, 04 Nov 2024 15:57:46 -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 8eac53e7b5 Ease index files format change
8eac53e7b5 is described below

commit 8eac53e7b54940388ab4ddcc8f346badc1cba15a
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Mon Nov 4 20:57:11 2024 +0000

    Ease index files format change
    
    * doc/texinfo.tex (\printindex): Delay \errmessage until
    end of document to allow rest of index to be output.  This
    reduces the chance of a completely empty index file being
    left which texi2dvi will not process.
    (\byeerror, \bye): Check and output \byeerror in @bye.
    
    This is an unlikely case which may not occur in real documents.
    It would only happen if @printindex was used on the same
    page as all of the index entries for the index.
---
 ChangeLog       | 14 ++++++++++++++
 doc/texinfo.tex | 15 ++++++++++++---
 2 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 731d565b1c..5dcb96ac8a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2024-11-04  Gavin Smith <gavinsmith0123@gmail.com>
+
+       Ease index files format change
+
+       * doc/texinfo.tex (\printindex): Delay \errmessage until
+       end of document to allow rest of index to be output.  This
+       reduces the chance of a completely empty index file being
+       left which texi2dvi will not process.
+       (\byeerror, \bye): Check and output \byeerror in @bye.
+
+       This is an unlikely case which may not occur in real documents.
+       It would only happen if @printindex was used on the same
+       page as all of the index entries for the index.
+
 2024-11-03  Patrice Dumas  <pertusus@free.fr>
 
        * contrib/nontests/test_all.sh: add copyright notice.
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index 73b9ff32cb..97a589c898 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{2024-11-03.09}
+\def\texinfoversion{2024-11-04.20}
 %
 % Copyright 1985, 1986, 1988, 1990-2024 Free Software Foundation, Inc.
 %
@@ -951,7 +951,11 @@ where each line of input produces a line of output.}
 \let\setfilename=\comment
 
 % @bye.
-\outer\def\bye{\chappager\pagelabels\tracingstats=1\ptexend}
+\outer\def\bye{%
+  \chappager\pagelabels
+  % possibly set in \printindex
+  \ifx\byeerror\relax\else\errmessage{\byeerror}\fi
+  \tracingstats=1\ptexend}
 
 
 \message{pdf,}
@@ -5439,6 +5443,9 @@ $$%
   \closein 1
 \endgroup}
 
+% Checked in @bye
+\let\byeerror\relax
+
 % If the index file starts with a backslash, forgo reading the index
 % file altogether.  If somebody upgrades texinfo.tex they may still have
 % old index files using \ as the escape character.  Reading this would
@@ -5447,7 +5454,9 @@ $$%
   \ifflagclear{txiindexescapeisbackslash}{%
     \uccode`\~=`\\ \uppercase{\if\noexpand~}\noexpand#1
       \ifflagclear{txiskipindexfileswithbackslash}{%
-\errmessage{%
+        % Delay the error message until the very end to give a chance
+        % for the whole index to be output as input for texindex.
+        \global\def\byeerror{%
 ERROR: A sorted index file in an obsolete format was skipped.  
 To fix this problem, please upgrade your version of 'texi2dvi'
 or 'texi2pdf' to that at <https://ftp.gnu.org/gnu/texinfo>.



reply via email to

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