[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Doc-string with newline character
From: |
David Kastrup |
Subject: |
Re: Doc-string with newline character |
Date: |
Sat, 02 Jan 2021 01:30:51 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Thomas Morley <thomasmorley65@gmail.com> writes:
> Am Fr., 1. Jan. 2021 um 20:07 Uhr schrieb David Kastrup <dak@gnu.org>:
>>
>> Thomas Morley <thomasmorley65@gmail.com> writes:
>>
>> > rtfm tends to help ;)
>> > Alas, I've no good idea how a `texi-quote` could work. Iiuc, one needs
>> > more than a simple search/replace.
>>
>> Just put a @ in front of every @, {, or } ?
>>
>> --
>> David Kastrup
>
> David, I don't understand what the proposed texi-quote should do.
>
> A tool to
> - improve incorrect doc-strings?
A tool to add the necessary @ characters to make computer-generated
output (like default values) that happens to contain @ { and }
characters actually print those characters in Texinfo passages rather
than make Texinfo bomb out.
> - format a doc-string with respect to texinfo?
No, just add quote characters to computer-generated parts of the output.
You would not pass any stuff already formatted for Texinfo through
texi-quote. Only stuff _not_ yet prepared to be passed into Texinfo.
> - format/improve only those parts of a doc-string, which are already
> wrapped in texinfo-code?
No, it would not analyse anything. It would only change @ { } to @@ @{
and @}. That's all.
In this case, you'd change something like
(format #f "....~s" default-value) to (format #f "....~a"
(texi-quote (format #f "~s" default-value)))
So that if default-value is a string that contains @ { } characters, it
will print properly.
> - do something else?
>
> Anyway, I've no clue how to do any of it.
--
David Kastrup