help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Printing \\= in the docstring


From: Stephen Berman
Subject: Re: Printing \\= in the docstring
Date: Tue, 16 Jul 2024 12:56:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

On Tue, 16 Jul 2024 10:49:05 +0200 Stephen Berman <stephen.berman@gmx.net> 
wrote:

> On Tue, 16 Jul 2024 08:32:36 +0000 Heime <heimeborgia@protonmail.com> wrote:
[...]
>> (defconst mydocstring ""
>>
>>   "In the docstring, apply the escape sequence \\\\= to stop conversion by
>>   `substitute-command-keys'."
>
> Thank you, now I can reproduce the problem.  From brief testing it seems
> "\\\\=" in a doc string only prints as "\\=" when it is the final
> character sequence in the doc string.  This could be a bug but I don't
> have time to debug it now.  However, escaping "\\=" as above does work:
>
> (defvar mydocstring ""
>
>   "In the docstring, apply the escape sequence \\\\=\\=\\= to stop
> conversion by `substitute-command-keys'.")

After seeing your post about the discussion of substitute-command-keys
in the Elisp manual, and re-reading that section, I have to make what I
wrote above more precise: to make "\\=" appear in a *Help* buffer by
itself, i.e. not functioning as an escape sequence, write "\\\\=\\=" in
the doc string; to make "\\=" appear in a *Help* buffer in a context
where it functions as an escape sequence, write "\\\\=\\=\\=" in the doc
string.  So in the above example of a doc string for the variable
`mydocstring', "\\\\=\\=" suffices.

Steve Berman



reply via email to

[Prev in Thread] Current Thread [Next in Thread]