update from texinfo
[gnulib.git] / config / texinfo.tex
index fb2b196..f86b706 100644 (file)
@@ -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{2003-04-27.15}
+\def\texinfoversion{2003-07-27.17}
 %
 % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 %   ftp://tug.org/tex/texinfo.tex
 %     (and all CTAN mirrors, see http://www.ctan.org),
 %   and /home/gd/gnu/doc/texinfo.tex on the GNU machines.
-% 
+%
 % The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
-% 
+%
 % The texinfo.tex in any given Texinfo distribution could well be out
 % of date, so if that's what you're using, please check.
-% 
+%
 % Send bug reports to bug-texinfo@gnu.org.  Please include including a
 % complete document in each bug report with which we can reproduce the
 % problem.  Patches are, of course, greatly appreciated.
@@ -55,7 +55,7 @@
 % The extra TeX runs get the cross-reference information correct.
 % Sometimes one run after texindex suffices, and sometimes you need more
 % than two; texi2dvi does it as many times as necessary.
-% 
+%
 % It is possible to adapt texinfo.tex for other languages, to some
 % extent.  You can get the existing language-specific files from the
 % full Texinfo distribution.
 
 % add check for \lastpenalty to plain's definitions.  If the last thing
 % we did was a \nobreak, we don't want to insert more space.
-% 
+%
 \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
   \removelastskip\penalty-50\smallskip\fi\fi}
 \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
 % explicit \vfill so that the extra space is at the bottom.  The
 % threshold for doing this is if the group is more than \vfilllimit
 % percent of a page (\vfilllimit can be changed inside of @tex).
-% 
+%
 \newbox\groupbox
 \def\vfilllimit{0.7}
 %
@@ -776,10 +776,10 @@ where each line of input produces a line of output.}
 % @inmargin{TEXT [, RIGHT-TEXT]}
 % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
 % else use TEXT for both).
-% 
+%
 \def\inmargin#1{\parseinmargin #1,,\finish}
 \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing.
-  \setbox0 = \hbox{\ignorespaces #2}% 
+  \setbox0 = \hbox{\ignorespaces #2}%
   \ifdim\wd0 > 0pt
     \def\lefttext{#1}%  have both texts
     \def\righttext{#2}%
@@ -850,7 +850,7 @@ where each line of input produces a line of output.}
 % We'll use ems for NCHARS, close enough.
 % NCHARS can also be the word `asis' or `none'.
 % We cannot feasibly implement @paragraphindent asis, though.
-% 
+%
 \def\asisword{asis} % no translation, these are keywords
 \def\noneword{none}
 %
@@ -887,14 +887,14 @@ where each line of input produces a line of output.}
 
 % @firstparagraphindent WORD
 % If WORD is `none', then suppress indentation of the first paragraph
-% after a section heading.  If WORD is `insert', then do indentat such
+% after a section heading.  If WORD is `insert', then do indent at such
 % paragraphs.
-% 
+%
 % The paragraph indentation is suppressed or not by calling
-% \suppressfirstparagraphindent, which the sectioning commands do.  We
-% switch the definition of this back and forth according to WORD.  By
-% default, we suppress indentation.
-% 
+% \suppressfirstparagraphindent, which the sectioning commands do.
+% We switch the definition of this back and forth according to WORD.
+% By default, we suppress indentation.
+%
 \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent}
 \newdimen\currentparindent
 %
@@ -915,10 +915,10 @@ where each line of input produces a line of output.}
 
 % Here is how we actually suppress indentation.  Redefine \everypar to
 % \kern backwards by \parindent, and then reset itself to empty.
-% 
+%
 % We also make \indent itself not actually do anything until the next
 % paragraph.
-% 
+%
 \gdef\dosuppressfirstparagraphindent{%
   \gdef\indent{%
     \global\let\indent=\ptexindent
@@ -940,14 +940,14 @@ where each line of input produces a line of output.}
 % We don't use $'s directly in the definition of \math because we need
 % to set catcodes according to plain TeX first, to allow for subscripts,
 % superscripts, special math chars, etc.
-% 
+%
 \let\implicitmath = $%$ font-lock fix
 %
 % One complication: _ usually means subscripts, but it could also mean
 % an actual _ character, as in @math{@var{some_variable} + 1}.  So make
 % _ within @math be active (mathcode "8000), and distinguish by seeing
 % if the current family is \slfam, which is what @var uses.
-% 
+%
 {\catcode\underChar = \active
 \gdef\mathunderscore{%
   \catcode\underChar=\active
@@ -958,7 +958,7 @@ where each line of input produces a line of output.}
 % FYI, plain.tex uses \\ as a temporary control sequence (why?), but
 % this is not advertised and we don't care.  Texinfo does not
 % otherwise define @\.
-% 
+%
 % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
 \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
 %
@@ -973,7 +973,7 @@ where each line of input produces a line of output.}
 % Some active characters (such as <) are spaced differently in math.
 % We have to reset their definitions in case the @math was an
 % argument to a command which set the catcodes (such as @item or @section).
-% 
+%
 {
   \catcode`^ = \active
   \catcode`< = \active
@@ -1099,8 +1099,8 @@ where each line of input produces a line of output.}
   \def\pdfmakeoutlines{{%
     \openin 1 \jobname.toc
     \ifeof 1\else\begingroup
-      \closein 1 
-      % Thanh's hack / proper braces in bookmarks  
+      \closein 1
+      % Thanh's hack / proper braces in bookmarks
       \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
       \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
       %
@@ -1129,7 +1129,7 @@ where each line of input produces a line of output.}
       \let\unnumbsubsubsecentry = \subsubsecentry
       %
       % Make special characters normal for writing to the pdf file.
-      % 
+      %
       \indexnofonts
       \let\tt=\relax
       \turnoffactive
@@ -1144,7 +1144,7 @@ where each line of input produces a line of output.}
       \let\nextmakelinks=\makelinks
       \ifnum\lnkcount>0,\fi
       \picknum{#1}%
-      \startlink attr{/Border [0 0 0]} 
+      \startlink attr{/Border [0 0 0]}
         goto name{\pdfmkpgn{\the\pgn}}%
       \linkcolor #1%
       \advance\lnkcount by 1%
@@ -1199,7 +1199,7 @@ where each line of input produces a line of output.}
     \ifx\first0\adn0
     \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
     \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
-    \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 
+    \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
     \else
       \ifnum0=\countA\else\makelink\fi
       \ifx\first.\let\next=\done\else
@@ -1453,12 +1453,12 @@ where each line of input produces a line of output.}
 %   8.5x11=90+  smallbook=80  a4=90+  a5=77
 % For me, subjectively, the few extra characters that fit aren't worth
 % the additional smallness of 8pt.  So I'm making the default 9pt.
-% 
+%
 % By the way, for comparison, here's what fits with @example (10pt):
 %   8.5x11=71  smallbook=60  a4=75  a5=58
-% 
+%
 % I wish we used A4 paper on this side of the Atlantic.
-% 
+%
 % --karl, 24jan03.
 
 
@@ -1508,7 +1508,7 @@ where each line of input produces a line of output.}
 % Set sfcode to normal for the chars that usually have another value.
 % Can't use plain's \frenchspacing because it uses the `\x notation, and
 % sometimes \x has an active definition that messes things up.
-% 
+%
 \catcode`@=11
   \def\frenchspacing{%
     \sfcode\dotChar  =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
@@ -1668,7 +1668,7 @@ where each line of input produces a line of output.}
 
 % rms does not like angle brackets --karl, 17may97.
 % So now @email is just like @uref, unless we are pdf.
-% 
+%
 %\def\email#1{\angleleft{\tt #1}\angleright}
 \ifpdf
   \def\email#1{\doemail#1,,\finish}
@@ -1717,7 +1717,7 @@ where each line of input produces a line of output.}
 % we'd have to redo the font mechanism to change the \scriptstyle and
 % \scriptscriptstyle font sizes to make it look right in headings.
 % Adapted from the plain.tex definition of \copyright.
-% 
+%
 \def\registeredsymbol{%
   $^{{\ooalign{\hfil\raise.07ex\hbox{$\scriptstyle\rm R$}\hfil\crcr\Orb}}%
     }$%
@@ -2135,18 +2135,21 @@ where each line of input produces a line of output.}
   \itemizey {#1}{\Eitemize}
 }
 
-\def\itemizey #1#2{%
-\aboveenvbreak %
-\itemmax=\itemindent %
-\advance \itemmax by -\itemmargin %
-\advance \leftskip by \itemindent %
-\exdentamount=\itemindent
-\parindent = 0pt %
-\parskip = \smallskipamount %
-\ifdim \parskip=0pt \parskip=2pt \fi%
-\def#2{\endgraf\afterenvbreak\endgroup}%
-\def\itemcontents{#1}%
-\let\item=\itemizeitem}
+\def\itemizey#1#2{%
+  \aboveenvbreak
+  \itemmax=\itemindent
+  \advance\itemmax by -\itemmargin
+  \advance\leftskip by \itemindent
+  \exdentamount=\itemindent
+  \parindent=0pt
+  \parskip=\smallskipamount
+  \ifdim\parskip=0pt \parskip=2pt \fi
+  \def#2{\endgraf\afterenvbreak\endgroup}%
+  \def\itemcontents{#1}%
+  % @itemize with no arg is equivalent to @itemize @bullet.
+  \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
+  \let\item=\itemizeitem
+}
 
 % \splitoff TOKENS\endmark defines \first to be the first token in
 % TOKENS, and \rest to be the remainder.
@@ -2521,20 +2524,6 @@ width0pt\relax} \fi
 % Prevent errors for section commands.
 % Used in @ignore and in failing conditionals.
 \def\ignoresections{%
-  \let\chapter=\relax
-  \let\unnumbered=\relax
-  \let\top=\relax
-  \let\unnumberedsec=\relax
-  \let\unnumberedsection=\relax
-  \let\unnumberedsubsec=\relax
-  \let\unnumberedsubsection=\relax
-  \let\unnumberedsubsubsec=\relax
-  \let\unnumberedsubsubsection=\relax
-  \let\section=\relax
-  \let\subsec=\relax
-  \let\subsubsec=\relax
-  \let\subsection=\relax
-  \let\subsubsection=\relax
   \let\appendix=\relax
   \let\appendixsec=\relax
   \let\appendixsection=\relax
@@ -2542,110 +2531,26 @@ width0pt\relax} \fi
   \let\appendixsubsection=\relax
   \let\appendixsubsubsec=\relax
   \let\appendixsubsubsection=\relax
+  %\let\begin=\relax
+  %\let\bye=\relax
+  \let\centerchap=\relax
+  \let\chapter=\relax
   \let\contents=\relax
+  \let\section=\relax
   \let\smallbook=\relax
+  \let\subsec=\relax
+  \let\subsection=\relax
+  \let\subsubsec=\relax
+  \let\subsubsection=\relax
   \let\titlepage=\relax
-}
-
-% Used in nested conditionals, where we have to parse the Texinfo source
-% and so want to turn off most commands, in case they are used
-% incorrectly.
-%
-% We use \empty instead of \relax for the @def... commands, so that \end
-% doesn't throw an error.  For instance:
-% @ignore
-% @deffn ...
-% @end deffn
-% @end ignore
-% 
-% The @end deffn is going to get expanded, because we're trying to allow
-% nested conditionals.  But we don't want to expand the actual @deffn,
-% since it might be syntactically correct and intended to be ignored.
-% Since \end checks for \relax, using \empty does not cause an error.
-% 
-\def\ignoremorecommands{%
-  \let\defcodeindex = \relax
-  \let\defcv = \empty
-  \let\defcvx = \empty
-  \let\Edefcv = \empty
-  \let\deffn = \empty
-  \let\deffnx = \empty
-  \let\Edeffn = \empty
-  \let\defindex = \relax
-  \let\defivar = \empty
-  \let\defivarx = \empty
-  \let\Edefivar = \empty
-  \let\defmac = \empty
-  \let\defmacx = \empty
-  \let\Edefmac = \empty
-  \let\defmethod = \empty
-  \let\defmethodx = \empty
-  \let\Edefmethod = \empty
-  \let\defop = \empty
-  \let\defopx = \empty
-  \let\Edefop = \empty
-  \let\defopt = \empty
-  \let\defoptx = \empty
-  \let\Edefopt = \empty
-  \let\defspec = \empty
-  \let\defspecx = \empty
-  \let\Edefspec = \empty
-  \let\deftp = \empty
-  \let\deftpx = \empty
-  \let\Edeftp = \empty
-  \let\deftypefn = \empty
-  \let\deftypefnx = \empty
-  \let\Edeftypefn = \empty
-  \let\deftypefun = \empty
-  \let\deftypefunx = \empty
-  \let\Edeftypefun = \empty
-  \let\deftypeivar = \empty
-  \let\deftypeivarx = \empty
-  \let\Edeftypeivar = \empty
-  \let\deftypemethod = \empty
-  \let\deftypemethodx = \empty
-  \let\Edeftypemethod = \empty
-  \let\deftypeop = \empty
-  \let\deftypeopx = \empty
-  \let\Edeftypeop = \empty
-  \let\deftypevar = \empty
-  \let\deftypevarx = \empty
-  \let\Edeftypevar = \empty
-  \let\deftypevr = \empty
-  \let\deftypevrx = \empty
-  \let\Edeftypevr = \empty
-  \let\defun = \empty
-  \let\defunx = \empty
-  \let\Edefun = \empty
-  \let\defvar = \empty
-  \let\defvarx = \empty
-  \let\Edefvar = \empty
-  \let\defvr = \empty
-  \let\defvrx = \empty
-  \let\Edefvr = \empty
-  \let\clear = \relax
-  \let\down = \relax
-  \let\evenfooting = \relax
-  \let\evenheading = \relax
-  \let\everyfooting = \relax
-  \let\everyheading = \relax
-  \let\headings = \relax
-  \let\include = \relax
-  \let\item = \relax
-  \let\lowersections = \relax
-  \let\oddfooting = \relax
-  \let\oddheading = \relax
-  \let\printindex = \relax
-  \let\pxref = \relax
-  \let\raisesections = \relax
-  \let\ref = \relax
-  \let\set = \relax
-  \let\setchapternewpage = \relax
-  \let\setchapterstyle = \relax
-  \let\settitle = \relax
-  \let\up = \relax
-  \let\verbatiminclude = \relax
-  \let\xref = \relax
+  \let\top=\relax
+  \let\unnumbered=\relax
+  \let\unnumberedsec=\relax
+  \let\unnumberedsection=\relax
+  \let\unnumberedsubsec=\relax
+  \let\unnumberedsubsection=\relax
+  \let\unnumberedsubsubsec=\relax
+  \let\unnumberedsubsubsection=\relax
 }
 
 % Ignore @ignore, @ifhtml, @ifinfo, and the like.
@@ -2667,141 +2572,76 @@ width0pt\relax} \fi
 % which this file should belong to.  Ignore this in TeX.
 \let\dircategory = \comment
 
-% Ignore text until a line `@end #1'.
+% Ignore text until a line `@end #1', keeping track of nested conditionals.
 %
+% A count to remember the depth of nesting.
+\newcount\doignorecount  \doignorecount = 0
+
 \def\doignore#1{\begingroup
   % Don't complain about control sequences we have declared \outer.
   \ignoresections
   %
-  % Define a command to swallow text until we reach `@end #1'.
-  % This @ is a catcode 12 token (that is the normal catcode of @ in
-  % this texinfo.tex file).  We change the catcode of @ below to match.
-  \long\def\doignoretext##1@end #1{\enddoignore}%
-  %
   % Make sure that spaces turn into tokens that match what \doignoretext wants.
   \catcode\spaceChar = 10
   %
-  % Ignore braces, too, so mismatched braces don't cause trouble.
+  % Ignore braces, so mismatched braces don't cause trouble.
   \catcode`\{ = 9
   \catcode`\} = 9
   %
-  % We must not have @c interpreted as a control sequence.
-  \catcode`\@ = 12
+  % Count number of #1's that we've seen.
+  \doignorecount = 0
   %
-  \def\ignoreword{#1}%
-  \ifx\ignoreword\documentdescriptionword
-    % The c kludge breaks documentdescription, since
-    % `documentdescription' contains a `c'.  Means not everything will
-    % be ignored inside @documentdescription, but oh well...
-  \else
-    % Make the letter c a comment character so that the rest of the line
-    % will be ignored. This way, the document can have (for example)
-    %   @c @end ifinfo
-    % and the @end ifinfo will be properly ignored.
-    % (We've just changed @ to catcode 12.)
-    \catcode`\c = 14
-  \fi
-  %
-  % And now expand the command defined above.
-  \doignoretext
-}
-
-% What we do to finish off ignored text.
-%
-\def\enddoignore{\endgroup\ignorespaces}%
-
-\newif\ifwarnedobs\warnedobsfalse
-\def\obstexwarn{%
-  \ifwarnedobs\relax\else
-  % We need to warn folks that they may have trouble with TeX 3.0.
-  % This uses \immediate\write16 rather than \message to get newlines.
-    \immediate\write16{}
-    \immediate\write16{WARNING: for users of Unix TeX 3.0!}
-    \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).}
-    \immediate\write16{If you are running another version of TeX, relax.}
-    \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.}
-    \immediate\write16{  Then upgrade your TeX installation if you can.}
-    \immediate\write16{  (See ftp://ftp.gnu.org/non-gnu/TeX.README.)}
-    \immediate\write16{If you are stuck with version 3.0, run the}
-    \immediate\write16{  script ``tex3patch'' from the Texinfo distribution}
-    \immediate\write16{  to use a workaround.}
-    \immediate\write16{}
-    \global\warnedobstrue
-    \fi
+  % Swallow text until we reach the matching `@end #1'.
+  \expandafter \dodoignore \csname#1\endcsname {#1}%
 }
 
-% **In TeX 3.0, setting text in \nullfont hangs tex.  For a
-% workaround (which requires the file ``dummy.tfm'' to be installed),
-% uncomment the following line:
-%%%%%\font\nullfont=dummy\let\obstexwarn=\relax
-
-% Ignore text, except that we keep track of conditional commands for
-% purposes of nesting, up to an `@end #1' command.
-%
-\def\nestedignore#1{%
-  \obstexwarn
-  % We must actually expand the ignored text to look for the @end
-  % command, so that nested ignore constructs work.  Thus, we put the
-  % text into a \vbox and then do nothing with the result.  To minimize
-  % the chance of memory overflow, we follow the approach outlined on
-  % page 401 of the TeXbook.
+{ \catcode`@=11 % We want to use \ST@P which cannot appear in texinfo source.
+  \obeylines %
   %
-  \setbox0 = \vbox\bgroup
-    % Don't complain about control sequences we have declared \outer.
-    \ignoresections
-    %
-    % Define `@end #1' to end the box, which will in turn undefine the
-    % @end command again.
-    \expandafter\def\csname E#1\endcsname{\egroup\ignorespaces}%
-    %
-    % We are going to be parsing Texinfo commands.  Most cause no
-    % trouble when they are used incorrectly, but some commands do
-    % complicated argument parsing or otherwise get confused, so we
-    % undefine them.
-    %
-    % We can't do anything about stray @-signs, unfortunately;
-    % they'll produce `undefined control sequence' errors.
-    \ignoremorecommands
-    %
-    % Set the current font to be \nullfont, a TeX primitive, and define
-    % all the font commands to also use \nullfont.  We don't use
-    % dummy.tfm, as suggested in the TeXbook, because some sites
-    % might not have that installed.  Therefore, math mode will still
-    % produce output, but that should be an extremely small amount of
-    % stuff compared to the main input.
-    %
-    \nullfont
-    \let\tenrm=\nullfont \let\tenit=\nullfont \let\tensl=\nullfont
-    \let\tenbf=\nullfont \let\tentt=\nullfont \let\smallcaps=\nullfont
-    \let\tensf=\nullfont
-    % Similarly for index fonts.
-    \let\smallrm=\nullfont \let\smallit=\nullfont \let\smallsl=\nullfont
-    \let\smallbf=\nullfont \let\smalltt=\nullfont \let\smallsc=\nullfont
-    \let\smallsf=\nullfont
-    % Similarly for smallexample fonts.
-    \let\smallerrm=\nullfont \let\smallerit=\nullfont \let\smallersl=\nullfont
-    \let\smallerbf=\nullfont \let\smallertt=\nullfont \let\smallersc=\nullfont
-    \let\smallersf=\nullfont
+  \gdef\dodoignore#1#2{%
+    % #1 contains, e.g., \ifinfo, a.k.a. @ifinfo.
+    % #2 contains the string `ifinfo'.
     %
-    % Don't complain when characters are missing from the fonts.
-    \tracinglostchars = 0
+    % Define a command to find the next "@end #2", which must be on a line
+    % by itself.
+    \long\def\doignoretext##1^^M\end #2{\doignoretextyyy##1#1\ST@P}%
+    % And this command to find another #1 command.
+    \long\def\doignoretextyyy##1#1##2\ST@P{\doignoreyyy{##2}\ST@P}%
     %
-    % Don't bother to do space factor calculations.
-    \frenchspacing
-    %
-    % Don't report underfull hboxes.
-    \hbadness = 10000
-    %
-    % Do minimal line-breaking.
-    \pretolerance = 10000
-    %
-    % Do not execute instructions in @tex.
-    \def\tex{\doignore{tex}}%
-    % Do not execute macro definitions.
-    % `c' is a comment character, so the word `macro' will get cut off.
-    \def\macro{\doignore{ma}}%
+    % And now expand that command.
+    \obeylines %
+    \doignoretext ^^M%
+  }%
 }
 
+\def\doignoreyyy#1{%
+  \def\temp{#1}%
+  \ifx\temp\empty                      % Nothing found.
+    \let\next\doignoretextzzz
+  \else                                        % Found a nested condition, ...
+    \advance\doignorecount by 1
+    \let\next\doignoretextyyy          % ..., look for another.
+    % If we're here, #1 ends with \ifinfo (for example).
+  \fi
+  \next #1% the token \ST@P is present just after this macro.
+}
+
+% We have to swallow the remaining "\ST@P".
+% 
+\def\doignoretextzzz#1{%
+  \ifnum\doignorecount = 0     % We have just found the outermost @end.
+    \let\next\enddoignore
+  \else                                % Still inside a nested condition.
+    \advance\doignorecount by -1
+    \let\next\doignoretext      % Look for the next @end.
+  \fi
+  \next
+}
+
+% Finish off ignored text.
+\def\enddoignore{\endgroup\ignorespaces}
+
+
 % @set VAR sets the variable VAR to an empty value.
 % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
 %
@@ -2878,7 +2718,7 @@ width0pt\relax} \fi
   \next
 }
 \def\ifsetsucceed{\conditionalsucceed{ifset}}
-\def\ifsetfail{\nestedignore{ifset}}
+\def\ifsetfail{\doignore{ifset}}
 \defineunmatchedend{ifset}
 
 % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
@@ -2894,7 +2734,7 @@ width0pt\relax} \fi
   \next
 }
 \def\ifclearsucceed{\conditionalsucceed{ifclear}}
-\def\ifclearfail{\nestedignore{ifclear}}
+\def\ifclearfail{\doignore{ifclear}}
 \defineunmatchedend{ifclear}
 
 % @iftex, @ifnothtml, @ifnotinfo, @ifnotplaintext always succeed; we
@@ -2967,10 +2807,10 @@ width0pt\relax} \fi
 
 % @synindex foo bar    makes index foo feed into index bar.
 % Do this instead of @defindex foo if you don't want it as a separate index.
-% 
+%
 % @syncodeindex foo bar   similar, but put all entries made for index foo
 % inside @code.
-% 
+%
 \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
 \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
 
@@ -3012,13 +2852,13 @@ width0pt\relax} \fi
 % Take care of Texinfo commands that can appear in an index entry.
 % Since there are some commands we want to expand, and others we don't,
 % we have to laboriously prevent expansion for those that we don't.
-% 
+%
 \def\indexdummies{%
   \def\@{@}% change to @@ when we switch to @ as escape char in index files.
   \def\ {\realbackslash\space }%
   % Need these in case \tex is in effect and \{ is a \delimiter again.
   % But can't use \lbracecmd and \rbracecmd because texindex assumes
-  % braces and backslashes are used only as delimiters.  
+  % braces and backslashes are used only as delimiters.
   \let\{ = \mylbrace
   \let\} = \myrbrace
   %
@@ -3027,14 +2867,14 @@ width0pt\relax} \fi
   % words, not control letters, because the \space would be incorrect
   % for control characters, but is needed to separate the control word
   % from whatever follows.
-  % 
+  %
   % For control letters, we have \definedummyletter, which omits the
   % space.
-  % 
+  %
   % These can be used both for control words that take an argument and
   % those that do not.  If it is followed by {arg} in the input, then
   % that will dutifully get written to the index (or wherever).
-  % 
+  %
   \def\definedummyword##1{%
     \expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}%
   }%
@@ -3047,9 +2887,9 @@ width0pt\relax} \fi
 }
 
 % For the aux file, @ is the escape character.  So we want to redefine
-% everything using @ instead of \realbackslash.  When everything uses 
+% everything using @ instead of \realbackslash.  When everything uses
 % @, this will be simpler.
-% 
+%
 \def\atdummies{%
   \def\@{@@}%
   \def\ {@ }%
@@ -3070,7 +2910,7 @@ width0pt\relax} \fi
 
 % Called from \indexdummies and \atdummies.  \definedummyword and
 % \definedummyletter must be defined first.
-% 
+%
 \def\commondummies{%
   %
   \normalturnoffactive
@@ -3390,6 +3230,7 @@ width0pt\relax} \fi
   %
   \smallfonts \rm
   \tolerance = 9500
+  \everypar = {}% don't want the \kern\-parindent from indentation suppression.
   \indexbreaks
   %
   % See if the index file exists and is nonempty.
@@ -3633,7 +3474,7 @@ width0pt\relax} \fi
   \wd0=\hsize \wd2=\hsize
   \hbox to\pagewidth{\box0\hfil\box2}%
 }
-% 
+%
 % All done with double columns.
 \def\enddoublecolumns{%
   \output = {%
@@ -4019,23 +3860,27 @@ width0pt\relax} \fi
 %          if justification is not attempted.  Hence \raggedright.
 
 
-\def\majorheading{\parsearg\majorheadingzzz}
-\def\majorheadingzzz #1{%
+\def\majorheading{%
   {\advance\chapheadingskip by 10pt \chapbreak }%
-  {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
-                    \parindent=0pt\raggedright
-                    \rm #1\hfill}}\bigskip \par\penalty 200}
+  \parsearg\chapheadingzzz
+}
 
-\def\chapheading{\parsearg\chapheadingzzz}
-\def\chapheadingzzz #1{\chapbreak %
+\def\chapheading{\chapbreak \parsearg\chapheadingzzz}
+\def\chapheadingzzz #1{%
   {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
                     \parindent=0pt\raggedright
-                    \rm #1\hfill}}\bigskip \par\penalty 200}
+                    \rm #1\hfill}}%
+  \bigskip \par\penalty 200\relax
+  \suppressfirstparagraphindent
+}
 
 % @heading, @subheading, @subsubheading.
-\def\heading{\parsearg\plainsecheading}
-\def\subheading{\parsearg\plainsubsecheading}
-\def\subsubheading{\parsearg\plainsubsubsecheading}
+\def\heading{\parsearg\doheading}
+\def\subheading{\parsearg\dosubheading}
+\def\subsubheading{\parsearg\dosubsubheading}
+\def\doheading#1{\plainsecheading{#1}\suppressfirstparagraphindent}
+\def\dosubheading#1{\plainsubsecheading{#1}\suppressfirstparagraphindent}
+\def\dosubsubheading#1{\plainsubsubsecheading{#1}\suppressfirstparagraphindent}
 
 % These macros generate a chapter, section, etc. heading only
 % (including whitespace, linebreaking, etc. around it),
@@ -4424,7 +4269,7 @@ width0pt\relax} \fi
 % @foo ... @end foo.
 
 % @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
-% 
+%
 % Since these characters are used in examples, it should be an even number of
 % \tt widths. Each \tt character is 1en, so two makes it 1em.
 %
@@ -4436,7 +4281,7 @@ width0pt\relax} \fi
 
 % The @error{} command.
 % Adapted from the TeXbook's \boxit.
-% 
+%
 \newbox\errorbox
 %
 {\tentt \global\dimen0 = 3em}% Width of the box.
@@ -4737,7 +4582,7 @@ width0pt\relax} \fi
 
 
 % LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
-% If we want to allow any <char> as delimiter, 
+% If we want to allow any <char> as delimiter,
 % we need the curly braces so that makeinfo sees the @verb command, eg:
 % `@verbx...x' would look like the '@verbx' command.  --janneke@gnu.org
 %
@@ -4815,8 +4660,8 @@ width0pt\relax} \fi
   \everypar{\starttabbox}%
 }
 
-% Do the @verb magic: verbatim text is quoted by unique 
-% delimiter characters.  Before first delimiter expect a 
+% Do the @verb magic: verbatim text is quoted by unique
+% delimiter characters.  Before first delimiter expect a
 % right brace, after last delimiter expect closing brace:
 %
 %    \def\doverb'{'<char>#1<char>'}'{#1}
@@ -4835,7 +4680,7 @@ width0pt\relax} \fi
 %
 %     \def\doverbatim#1@end verbatim{#1}
 %
-% For Texinfo it's a lot easier than for LaTeX, 
+% For Texinfo it's a lot easier than for LaTeX,
 % because texinfo's \verbatim doesn't stop at '\end{verbatim}':
 % we need not redefine '\', '{' and '}'.
 %
@@ -4902,14 +4747,14 @@ width0pt\relax} \fi
 % @copying ... @end copying.
 % Save the text away for @insertcopying later.  Many commands won't be
 % allowed in this context, but that's ok.
-% 
+%
 % We save the uninterpreted tokens, rather than creating a box.
 % Saving the text in a box would be much easier, but then all the
 % typesetting commands (@smallbook, font changes, etc.) have to be done
 % beforehand -- and a) we want @copying to be done first in the source
 % file; b) letting users define the frontmatter in as flexible order as
 % possible is very desirable.
-% 
+%
 \def\copying{\begingroup
   % Define a command to swallow text until we reach `@end copying'.
   % \ is the escape char in this texinfo.tex file, so it is the
@@ -4932,15 +4777,15 @@ width0pt\relax} \fi
 % end-of-line to be a \par, as would happen with the normal active
 % definition of ^^M.  On the third hand, two ^^M's in a row should still
 % generate a \par.
-% 
+%
 % Our approach is to make ^^M insert a space and a penalty1 normally;
 % then it can also check if \lastpenalty=1.  If it does, then manually
 % do \par.
-% 
+%
 % This messes up the normal definitions of @c[omment], so we redefine
 % it.  Similarly for @ignore.  (These commands are used in the gcc
 % manual for man page generation.)
-% 
+%
 % Seems pretty fragile, most line-oriented commands will presumably
 % fail, but for the limited use of getting the copying text (which
 % should be quite simple) inserted, we can hope it's ok.
@@ -4981,7 +4826,7 @@ width0pt\relax} \fi
 \newcount\parencount
 
 % We want ()&[] to print specially on the defun line.
-% 
+%
 \def\activeparens{%
   \catcode`\(=\active \catcode`\)=\active
   \catcode`\&=\active
@@ -5084,7 +4929,7 @@ width0pt\relax} \fi
 % #1 is the \E... control sequence to end the definition (which we define).
 % #2 is the \...x control sequence (which our caller defines).
 % #3 is the control sequence to process the header, such as \defunheader.
-% 
+%
 \def\parsebodycommon#1#2#3{%
   \begingroup\inENV
   % If there are two @def commands in a row, we'll have a \nobreak,
@@ -5107,7 +4952,7 @@ width0pt\relax} \fi
 }
 
 % Common part of the \...x definitions.
-% 
+%
 \def\defxbodycommon{%
   % As with \parsebodycommon above, allow line break if we have multiple
   % x headers in a row.  It's not a great place, though.
@@ -5158,7 +5003,7 @@ width0pt\relax} \fi
 % to account for this both in the \...x definition and in parsing the
 % input at hand.  Thus also need a control sequence (passed as #5) for
 % the \E... definition to assign the category name to.
-% 
+%
 \def\deftypeopparsebody#1#2#3#4#5 #6 {%
   \parsebodycommon{#1}{#2}{#3}%
   \def#2##1 ##2 ##3 {\def#4{##1}%
@@ -5263,7 +5108,7 @@ width0pt\relax} \fi
 }
 
 % This expands the args and terminates the paragraph they comprise.
-% 
+%
 \def\defunargs#1{\functionparens \sl
 % Expand, preventing hyphenation at `-' chars.
 % Note that groups don't affect changes in \hyphenchar.
@@ -5525,7 +5370,7 @@ width0pt\relax} \fi
 
 % These definitions are used if you use @defunx (etc.)
 % anywhere other than immediately after a @defun or @defunx.
-% 
+%
 \def\defcvx#1 {\errmessage{@defcvx in invalid context}}
 \def\deffnx#1 {\errmessage{@deffnx in invalid context}}
 \def\defivarx#1 {\errmessage{@defivarx in invalid context}}
@@ -5697,7 +5542,7 @@ width0pt\relax} \fi
 
 % Called by \do from \dounmacro on each macro.  The idea is to omit any
 % macro definitions that have been changed to \relax.
-% 
+%
 \def\unmacrodo#1{%
   \ifx#1\relax
     % remove this
@@ -5892,14 +5737,14 @@ width0pt\relax} \fi
 % anchor), namely NAME-title (the corresponding @chapter/etc. name),
 % NAME-pg (the page number), and NAME-snt (section number and type).
 % Called from \foonoderef.
-% 
+%
 % We have to set \indexdummies so commands such as @code in a section
 % title aren't expanded.  It would be nicer not to expand the titles in
 % the first place, but there's so many layers that that is hard to do.
 %
 % Likewise, use \turnoffactive so that punctuation chars such as underscore
 % and backslash work in node names.
-% 
+%
 \def\setref#1#2{{%
   \atdummies
   \pdfmkdest{#1}%
@@ -5998,7 +5843,7 @@ width0pt\relax} \fi
 % output.  It's a separate macro only so it can be changed more easily,
 % since not square brackets don't work in some documents.  Particularly
 % one that Bob is working on :).
-% 
+%
 \def\xrefprintnodename#1{[#1]}
 
 % \dosetq is called from \setref to do the actual \write (\iflinks).
@@ -6015,7 +5860,7 @@ width0pt\relax} \fi
 \def\internalsetq#1#2{@xrdef{#1}{\csname #2\endcsname}}
 
 % Things to be expanded by \internalsetq.
-% 
+%
 \def\Ypagenumber{\folio}
 \def\Ytitle{\thissection}
 \def\Ynothing{}
@@ -6173,7 +6018,6 @@ width0pt\relax} \fi
     \closein 1
     \input \jobname.aux
     \global\havexrefstrue
-    \global\warnedobstrue
   \fi
   % Open the new aux file.  TeX will close it automatically at exit.
   \openout\auxfile=\jobname.aux
@@ -6348,7 +6192,7 @@ width0pt\relax} \fi
     \nobreak\bigskip
     % Usually we'll have text after the image which will insert
     % \parskip glue, so insert it here too to equalize the space
-    % above and below. 
+    % above and below.
     \nobreak\vskip\parskip
     \nobreak
     \line\bgroup\hss
@@ -6436,7 +6280,7 @@ should work if nowhere else does.}
 % Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
 % 4) hoffset; 5) binding offset; 6) topskip; 7) physical page height; 8)
 % physical page width.
-% 
+%
 % We also call \setleading{\textleading}, so the caller should define
 % \textleading.  The caller should also set \parskip.
 %
@@ -6504,7 +6348,7 @@ should work if nowhere else does.}
   \parskip = 3pt plus 2pt minus 1pt
   \textleading = 13.2pt
   %
-  % Double-side printing via postscript on Laserjet 4050 
+  % Double-side printing via postscript on Laserjet 4050
   % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
   % To change the settings for a different printer or situation, adjust
   % \normaloffset until the front-side and back-side texts align.  Then
@@ -6545,7 +6389,7 @@ should work if nowhere else does.}
   \tableindent = 12mm
 }}
 
-% A specific text layout, 24x15cm overall, intended for A4 paper.  
+% A specific text layout, 24x15cm overall, intended for A4 paper.
 \def\afourlatex{{\globaldefs = 1
   \afourpaper
   \internalpagesizes{237mm}{150mm}%
@@ -6721,7 +6565,7 @@ should work if nowhere else does.}
 % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
 % the literal character `\'.  (Thus, \ is not expandable when this is in
 % effect.)
-% 
+%
 @def@normalturnoffactive{@turnoffactive @let\=@normalbackslash}
 
 % Make _ and + \other characters, temporarily.
@@ -6750,7 +6594,7 @@ should work if nowhere else does.}
 % Say @foo, not \foo, in error messages.
 @escapechar = `@@
 
-% These look ok in all fonts, so just make them not special.  
+% These look ok in all fonts, so just make them not special.
 @catcode`@& = @other
 @catcode`@# = @other
 @catcode`@% = @other