On Mon, Jan 01, 2018 at 05:55:52PM +0000, Alan Mackenzie wrote:
> The actual source in cc-mode.texi which showed up the bug was indeed in
> a macro, namely:
>
> @macro hereFn{func}
> <- @i{\func\}@c
> @end macro
>
> . This macro was committed on 2003-05-12. The @c at EOL2 looks like a
> workaround for some glitch in an earlier version of makeinfo. (As a
> matter of interest, makeinfo 4.13 builds the source correctly, whether
> or not the "@c" is present.).
>
> This workaround could be present in a lot of files.texi that were being
> actively modified around 15 years ago. Again, would it be possible to
> output a warning for this situation, and possibly document it in
> texinfo's own documentation?
>
> Thanks!
I ran a test with a very old version of texinfo.tex, the version in
Texinfo 3.0, (texinfo.tex itself reports a version of 2.108) and the
newline disappears from the end of the comment too:
\input texinfo
@setfilename
@example
@group
main (int,
char **@c some comment
)
@end group
@end example
@bye
This is somewhat beside the point because the @c is appearing through a
macro (which wasn't supported in this old version of texinfo.tex). I tried
the following with the texinfo.tex in Texinfo 4.13:
\input texinfo
@setfilename
@macro m
<-- here@c somecomment
@end macro
@example
@group
main (int,
char **@m{}
)
@end group
@end example
@bye
and the expected output is obtained. Somehow when @c is used directly
in place of @m{} it is joined with the following line.
I tried the same with the most recent version of texinfo.tex
(2017-12-26.21) and the same happens: with
@example
@group
main (int,
char **@m{}
char **@c
)
@end group
@end example
the lines are not joined after the @m{} but they are joined after the
@c.
There could be a case for changing makeinfo to be consistent with
texinfo.tex, provided we can work out what texinfo.tex is doing.