*** texinfo.tex 2015-08-15 18:45:11.000000000 +0100 --- texinfo.tex-BSMACRO 2015-08-15 20:38:31.000000000 +0100 *************** *** 3,9 **** % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % ! \def\texinfoversion{2015-08-03.11} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, --- 3,9 ---- % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % ! \def\texinfoversion{2015-08-03.11-bsmacro} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, *************** *** 7343,7353 **** } \fi - % Used to remove a category 13 newline, added to the end of the last - % line read in by \scantokens. - {\catcode`\^^M=13 \gdef\gobblecr^^M{}} - - % Argument is macro body with arguments substituted \def\scanmacro#1{\begingroup \newlinechar`\^^M \let\xeatspaces\eatspaces --- 7343,7348 ---- *************** *** 7362,7375 **** % ... and for \example: \spaceisspace % ! \ifnum\catcode`\^^M=5 ! % The \empty here causes a following catcode 5 newline to be eaten as ! % part of reading whitespace after a control sequence. ! \scantokens{#1\empty}% ! \else ! \catcode`\^^M=13 ! \scantokens{#1\gobblecr}% ! \fi \endgroup} \def\scanexp#1{% --- 7357,7371 ---- % ... and for \example: \spaceisspace % ! % The \empty here causes a following catcode 5 newline to be eaten as ! % part of reading whitespace after a control sequence. It does not ! % eat a catcode 13 newline. There's no good way to handle the two ! % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX ! % would then have different behavior). See the Macro Details node in ! % the manual for the workaround we recommend for macros and ! % line-oriented commands. ! % ! \scantokens{#1\empty}% \endgroup} \def\scanexp#1{% *************** *** 7464,7470 **** \def\macroargctxt{% used when scanning invocations \scanctxt ! \catcode`\\=0 } % why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes" % for the single characters \ { }. Thus, we end up with the "commands" --- 7460,7468 ---- \def\macroargctxt{% used when scanning invocations \scanctxt ! \catcode`\ =\other ! \catcode`\\=\active ! %\catcode`\\=0 } % why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes" % for the single characters \ { }. Thus, we end up with the "commands" *************** *** 7911,7926 **** \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} % \braceorline MAC is used for a one-argument macro MAC. It checks % whether the next non-whitespace character is a {. It sets the context % for reading the argument (slightly different in the two cases). Then, ! % to read the argument, in the whole-line case, it then calls the ! % regular \parsearg MAC; in the lbrace case, it just calls MAC itself. % \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% ! \ifx\nchar\bgroup\macroargctxt ! \else\macrolineargctxt\expandafter\parsearg \fi \macnamexxx} --- 7909,7986 ---- \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} + + address@hidden \catcode`\\=13 + @address@hidden + + @tracingmacros=2 + @errorcontextlines=100 + + % Call #1 with a list of tokens #2, with any doubled backslashes in #2 + % compressed to one. + @address@hidden + @address@hidden + @address@hidden + @address@hidden@finish}% + @address@hidden + @address@hidden@relax + @address@hidden + } + + @address@hidden + @address@hidden@look_aheadzzz} + @address@hidden + @address@hidden + @address@hidden@gobble_and_check_finish + @else + @address@hidden@add_segment + @address@hidden + } + + % double backslash found. add a single backslash here. + @address@hidden + @add_the_backslash + @address@hidden + @address@hidden@add_segment + } + + @address@hidden + @address@hidden@address@hidden@address@hidden + } + + @address@hidden + @address@hidden@finish + @address@hidden@call_the_macro% + @else + @address@hidden@look_ahead + % + % append to @arg_result + % token list registers might be better + @address@hidden@address@hidden + @address@hidden@address@hidden + @address@hidden@expandafter{% + @address@hidden + @pending_backslash#1}% + @address@hidden + @address@hidden + + @address@hidden@address@hidden@address@hidden + + } + % \braceorline MAC is used for a one-argument macro MAC. It checks % whether the next non-whitespace character is a {. It sets the context % for reading the argument (slightly different in the two cases). Then, ! % to read the argument, in the whole-line case, it then calls the regular ! % \parsearg MAC; in the lbrace case, it calls \passargtomacro MAC. % \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% ! \ifx\nchar\bgroup ! \macroargctxt ! \expandafter\passargtomacro ! \else ! \macrolineargctxt\expandafter\parsearg \fi \macnamexxx}