aboutsummaryrefslogtreecommitdiffstats
path: root/doc/misc/texinfo.tex
diff options
context:
space:
mode:
Diffstat (limited to 'doc/misc/texinfo.tex')
-rw-r--r--doc/misc/texinfo.tex33
1 files changed, 14 insertions, 19 deletions
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index c8913ab918e..338bcf65040 100644
--- a/doc/misc/texinfo.tex
+++ b/doc/misc/texinfo.tex
@@ -3,7 +3,7 @@
3% Load plain if necessary, i.e., if running under initex. 3% Load plain if necessary, i.e., if running under initex.
4\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi 4\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
5% 5%
6\def\texinfoversion{2016-09-18.18} 6\def\texinfoversion{2017-01-14.15}
7% 7%
8% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 8% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
9% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 9% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -165,6 +165,9 @@
165% Give the space character the catcode for a space. 165% Give the space character the catcode for a space.
166\def\spaceisspace{\catcode`\ =10\relax} 166\def\spaceisspace{\catcode`\ =10\relax}
167 167
168% Likewise for ^^M, the end of line character.
169\def\endlineisspace{\catcode13=10\relax}
170
168\chardef\dashChar = `\- 171\chardef\dashChar = `\-
169\chardef\slashChar = `\/ 172\chardef\slashChar = `\/
170\chardef\underChar = `\_ 173\chardef\underChar = `\_
@@ -950,21 +953,14 @@ where each line of input produces a line of output.}
950% @comment ...line which is ignored... 953% @comment ...line which is ignored...
951% @c is the same as @comment 954% @c is the same as @comment
952% @ignore ... @end ignore is another way to write a comment 955% @ignore ... @end ignore is another way to write a comment
953%
954\def\comment{\begingroup \catcode`\^^M=\active%
955\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other\commentxxx}%
956 956
957{\catcode`\^^M=\active%
958\gdef\commentxxx#1^^M{\endgroup%
959\futurelet\nexttoken\commentxxxx}%
960\gdef\commentxxxx{\ifx\nexttoken\aftermacro\expandafter\comment\fi}%
961}
962 957
963\def\c{\begingroup \catcode`\^^M=\active% 958\def\c{\begingroup \catcode`\^^M=\active%
964\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% 959\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
965\cxxx} 960\cxxx}
966{\catcode`\^^M=\active \gdef\cxxx#1^^M{\endgroup}} 961{\catcode`\^^M=\active \gdef\cxxx#1^^M{\endgroup}}
967% See comment in \scanmacro about why the definitions of @c and @comment differ 962%
963\let\comment\c
968 964
969% @paragraphindent NCHARS 965% @paragraphindent NCHARS
970% We'll use ems for NCHARS, close enough. 966% We'll use ems for NCHARS, close enough.
@@ -8031,9 +8027,6 @@ end
8031 } 8027 }
8032\fi 8028\fi
8033 8029
8034\let\aftermacroxxx\relax
8035\def\aftermacro{\aftermacroxxx}
8036
8037% alias because \c means cedilla in @tex or @math 8030% alias because \c means cedilla in @tex or @math
8038\let\texinfoc=\c 8031\let\texinfoc=\c
8039 8032
@@ -8055,18 +8048,13 @@ end
8055 \catcode`\\=\active 8048 \catcode`\\=\active
8056 % 8049 %
8057 % Process the macro body under the current catcode regime. 8050 % Process the macro body under the current catcode regime.
8058 \scantokens{#1@texinfoc}\aftermacro% 8051 \scantokens{#1@texinfoc}%
8059 % 8052 %
8060 \catcode`\@=\savedcatcodeone 8053 \catcode`\@=\savedcatcodeone
8061 \catcode`\\=\savedcatcodetwo 8054 \catcode`\\=\savedcatcodetwo
8062 % 8055 %
8063 % The \texinfoc is to remove the \newlinechar added by \scantokens, and 8056 % The \texinfoc is to remove the \newlinechar added by \scantokens, and
8064 % can be noticed by \parsearg. 8057 % can be noticed by \parsearg.
8065 % The \aftermacro allows a \comment at the end of the macro definition
8066 % to duplicate itself past the final \newlinechar added by \scantokens:
8067 % this is used in the definition of \group to comment out a newline. We
8068 % don't do the same for \c to support Texinfo files with macros that ended
8069 % with a @c, which should no longer be necessary.
8070 % We avoid surrounding the call to \scantokens with \bgroup and \egroup 8058 % We avoid surrounding the call to \scantokens with \bgroup and \egroup
8071 % to allow macros to open or close groups themselves. 8059 % to allow macros to open or close groups themselves.
8072} 8060}
@@ -8538,6 +8526,13 @@ end
8538 \ifcase\paramno 8526 \ifcase\paramno
8539 % 0 8527 % 0
8540 \expandafter\xdef\csname\the\macname\endcsname{% 8528 \expandafter\xdef\csname\the\macname\endcsname{%
8529 \bgroup
8530 \noexpand\spaceisspace
8531 \noexpand\endlineisspace
8532 \noexpand\expandafter % skip any whitespace after the macro name.
8533 \expandafter\noexpand\csname\the\macname @@@\endcsname}%
8534 \expandafter\xdef\csname\the\macname @@@\endcsname{%
8535 \egroup
8541 \noexpand\scanmacro{\macrobody}}% 8536 \noexpand\scanmacro{\macrobody}}%
8542 \or % 1 8537 \or % 1
8543 \expandafter\xdef\csname\the\macname\endcsname{% 8538 \expandafter\xdef\csname\the\macname\endcsname{%