Bug#815205: another texinfo.tex bug in \scanmacro

Gavin Smith gavinsmith0123 at gmail.com
Wed Mar 16 19:54:44 UTC 2016


On 16 March 2016 at 10:01, Norbert Preining <preining at logic.at> wrote:
>
> I reduced the problem to the following minimal not-working
> example:
>
>>>>>>>>>>>>>>>>>
> \input texinfo   @c -*-texinfo-*-
>
> @iftex
> @tex
> \newif\ifdash
> \long\def\dashp#1{\expandafter\setnext#1-\dashphelper}
> \long\def\setnext#1-{\futurelet\next\dashphelper}
> \long\def\dashphelper#1\dashphelper{
>   \ifx\dashphelper\next\dashfalse\else\dashtrue\fi
> }
> \def\lw#1{\leavevmode\dashp{#1}\ifdash#1\else\hbox{#1}\fi}
> @end tex
> @end iftex
>
> @macro lw{word}
> @tex
> \\lw{\word\}%
> @end tex
> @end macro
>
> @code{@lw{aaa}}
>
> @bye
>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
> and the error message is
> /mnwe.texinfo:21: TeX capacity exceeded, sorry [text input levels=15].

Why not use a different name for the \lw macro defined in the @tex
block, so it isn't used in its own definition?  That's the cause of
the problem. If I remember correctly, the TeX implementation had a way
that the previous definition of a macro could be used in the
definition of a macro, but I must have broken or removed it.  I expect
that's why this code used to work. As far as I know, this was never
implemented in makeinfo. (This didn't apply for @rmacro, either.) In
this context @lw and \lw are the same thing and it would be a
significant complication to make them different, and it doesn't seem
necessary to make this work.



More information about the pkg-common-lisp-devel mailing list