texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Gavin D. Smith
Date: Sun, 25 Dec 2022 09:26:25 -0500 (EST)

branch: master
commit 20ca67d8f41a97a4f94d43bb84e5f19921928e52
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sun Dec 25 14:06:08 2022 +0000

    Reduce scope of catcode changes throughout texinfo.tex
    
    * doc/texinfo.tex: Surround character encoding definition macros
    in a group, define with \gdef and limit the catcode changes
    for non-ASCII characters to the group.  Move the use of
    @documentencoding to the very end of the file.
---
 ChangeLog       |  9 +++++++++
 doc/texinfo.tex | 27 +++++++++++++++------------
 2 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 597fd85785..22c241cfdf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2022-12-25  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       Reduce scope of catcode changes throughout texinfo.tex
+
+       * doc/texinfo.tex: Surround character encoding definition macros
+       in a group, define with \gdef and limit the catcode changes
+       for non-ASCII characters to the group.  Move the use of
+       @documentencoding to the very end of the file.
+
 2022-12-25  Gavin Smith  <gavinsmith0123@gmail.com>
 
        * doc/texinfo.tex: Remove "emacs-page" delimiter from the one
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index 1e22ff1fed..92c41e7586 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{2022-12-25.14}
+\def\texinfoversion{2022-12-25.15}
 %
 % Copyright 1985, 1986, 1988, 1990-2022 Free Software Foundation, Inc.
 %
@@ -9938,12 +9938,6 @@ directory should work if nowhere else does.}
 % Take account of \c (plain) vs. \, (Texinfo) difference.
 \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi}
 
-% First, make active non-ASCII characters in order for them to be
-% correctly categorized when TeX reads the replacement text of
-% macros containing the character definitions.
-\setnonasciicharscatcode\active
-%
-
 \def\gdefchar#1#2{%
 \gdef#1{%
    \ifpassthroughchars
@@ -9953,8 +9947,14 @@ directory should work if nowhere else does.}
    \fi
 }}
 
+\begingroup
+
+% Make non-ASCII characters active for defining the character definition
+% macros.
+\setnonasciicharscatcode\active
+
 % Latin1 (ISO-8859-1) character definitions.
-\def\latonechardefs{%
+\gdef\latonechardefs{%
   \gdefchar^^a0{\tie}
   \gdefchar^^a1{\exclamdown}
   \gdefchar^^a2{{\tcfont \char162}} % cent
@@ -10059,7 +10059,7 @@ directory should work if nowhere else does.}
 }
 
 % Latin9 (ISO-8859-15) encoding character definitions.
-\def\latninechardefs{%
+\gdef\latninechardefs{%
   % Encoding is almost identical to Latin1.
   \latonechardefs
   %
@@ -10074,7 +10074,7 @@ directory should work if nowhere else does.}
 }
 
 % Latin2 (ISO-8859-2) character definitions.
-\def\lattwochardefs{%
+\gdef\lattwochardefs{%
   \gdefchar^^a0{\tie}
   \gdefchar^^a1{\ogonek{A}}
   \gdefchar^^a2{\u{}}
@@ -10178,6 +10178,8 @@ directory should work if nowhere else does.}
   \gdefchar^^ff{\dotaccent{}}
 }
 
+\endgroup % active chars
+
 % UTF-8 character definitions.
 %
 % This code to support UTF-8 is based on LaTeX's utf8.def, with some
@@ -11231,13 +11233,11 @@ directory should work if nowhere else does.}
 }
 
 % Define all Unicode characters we know about
-% and make UTF-8 the default encoding.
 \iftxinativeunicodecapable
   \nativeunicodechardefsatu
 \else
   \utfeightchardefs
 \fi
-\documentencodingzzz{UTF-8}
 
 
 \message{formatting,}
@@ -11584,6 +11584,9 @@ directory should work if nowhere else does.}
 
 \message{and turning on texinfo input format.}
 
+% Make UTF-8 the default encoding.
+\documentencodingzzz{UTF-8}
+
 \def^^L{\par} % remove \outer, so ^L can appear in an @comment
 \catcode`\^^K = 10 % treat vertical tab as whitespace
 



reply via email to

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