unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Heime <heimeborgia@protonmail.com>
Cc: Heime via Users list for the GNU Emacs text editor
	<help-gnu-emacs@gnu.org>
Subject: Re: Printing \\= in the docstring
Date: Tue, 16 Jul 2024 12:56:57 +0200	[thread overview]
Message-ID: <87zfqh7gg6.fsf@gmx.net> (raw)
In-Reply-To: <874j8p90xq.fsf@gmx.net> (Stephen Berman's message of "Tue, 16 Jul 2024 10:49:05 +0200")

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	other threads:[~2024-07-16 10:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <WOGXhoHXi-ghoVidse8cDwgfvmLUKIRqLxBwbF97alGfbnXgAISYEy9GKfzTC6yCqxaCn4Yjks7lzl_bTZyEuhIv91aWowm9r3whjcWlmz0=@protonmail.com>
2024-07-15 22:43 ` Printing \\= in the docstring Heime
2024-07-15 23:10   ` Stephen Berman
2024-07-16  8:20     ` Heime
2024-07-16  8:25       ` Stephen Berman
2024-07-16  8:32         ` Heime
2024-07-16  8:49           ` Stephen Berman
2024-07-16 10:56             ` Stephen Berman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zfqh7gg6.fsf@gmx.net \
    --to=stephen.berman@gmx.net \
    --cc=heimeborgia@protonmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).