[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in dumpdef's documentation
From: |
Eric Blake |
Subject: |
Re: Bug in dumpdef's documentation |
Date: |
Tue, 26 Oct 2021 11:21:39 -0500 |
User-agent: |
NeoMutt/20211022-9-8e6511 |
On Tue, Oct 26, 2021 at 02:30:26AM +0200, 4dr14n31t0r Th3 G4m3r wrote:
> The output documented is not what you get from executing the m4 commands as
> documented. See https://www.gnu.org/software/m4/manual/m4.html#Dumpdef
Thanks for the report. More details would have been nice (what you
think was wrong, and what you were expecting), but I can reproduce
that where the manual says:
dumpdef(`foo')
error→foo: ⇒
in practice (given the earlier definition of foo in the example), it should be:
dumpdef(`foo')
error→foo: `Hello world.'
⇒
Looking at the source, in doc/m4.texi, there is:
@example
$ @kbd{m4 -d}
define(`foo', `Hello world.')
@result{}
dumpdef(`foo')
@error{}foo:@tabchar{}`Hello world.'
@result{}
dumpdef(`define')
@error{}define:@tabchar{}<define>
@result{}
@end example
My initial guess is that there is a bug in the texi -> html conversion
where @tabchar{} gets eaten incorrectly, resulting in the html output
omitting the rest of the intended line. But checking just now, I see
the same problem in 'info m4' on the corresponding page, so it is not
a bug in the conversion, but in the m4.texi source itself. Earlier in
the m4.texi, there is:
@c @tabchar{}
@c ----------
@c The testsuite expects literal tab output in some examples, but
@c literal tabs in texinfo lead to formatting issues.
@macro tabchar
@ @c
@end macro
So maybe the problem is that the macro expansion is leaving a bare @c
which then eats the rest of the line when using the macro within
@example.
I'm cc'ing the texinfo list to see if someone can figure out the
correct magic to use faster than I can.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org