Re: [patch] Share options between info and man page

Mingjie Xing
2014-06-25T01:30:16Z

2014-06-24 23:55 GMT+08:00 Eli Zaretskii <eliz@gnu.org>:
>> From: Mingjie Xing <mingjie.xing@gmail.com>
>> Date: Tue, 24 Jun 2014 15:08:29 +0800
>> Cc: Eli Zaretskii <eliz@gnu.org>, gdb-patches@sourceware.org
>>
>> 2014-06-23 21:45 GMT+08:00 Pedro Alves <palves@redhat.com>:
>> >
>> > Should we re-define it as a macro under ifset man ?
>> >
>> > @ifset man
>> > @macro t{text}
>> > \text\
>> > @end macro
>> > @end ifset
>> >
>> > (I don't actually know whether possible.)
>>
>> This does not work.
>
> What exactly doesn't work, and how?

The man pages are generated by texi2pod.pl which doesn't care about
texinfo macros. So with the above macro re-definition, "C@t{++}"
would still be misrendered.

So what I suggest is to retain "C@t{++}" in gdb.texinfo, and add a
substitution "s/\@t\{([^\}]*)\}/$1/g;" in texi2pod.pl. Thus the format
will not be lost in info pages.