all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Andreas Schwab'" <schwab@linux-m68k.org>,
	"'Lars Magne Ingebrigtsen'" <larsi@gnus.org>
Cc: 8935@debbugs.gnu.org
Subject: bug#8935: 24.0.50; `substitute-command-keys' doc
Date: Fri, 15 Jul 2011 12:17:46 -0700	[thread overview]
Message-ID: <52B42160EFF24B69AE5BBAC0A0D03346@us.oracle.com> (raw)
In-Reply-To: <m2tyanqtht.fsf@igel.home>

> > "\=\e" will print as "\e"? Right?  So it's not a noop, and the fix I
> > applied was correct.
> 
> No.  The *only* special sequences processed by 
> substitute-command-keys' are '\=', '\[', '\<' and '\{'.
> Nothing else.

Correct.

> The sentence is about how to write these special sequences in
> the doc string so that they are not treated specially,

Correct.

> so the examples should talk about '\=' and '\[', not about '\'.

It's OK to mention that in "\=\[" the \= escapes the \ so that \[ appears in the
output.  But it is only the \ that is being escaped here.

Escaping a character means making it act normally, not specially.  Only the \
acts specially, and it does so only when it precedes [, {, etc.

So yes, this escaping of \ only has an effect when the \ precedes [, {, etc.

But strictly speaking it is only the \ that gets escaped in these contexts.  The
=, [, etc. does not need to be escaped because those are not treated specially
unless preceded by an unescaped \.  So only one character needs to be escaped:
the \.

Anyway, it's a minor point (bug).  I really don't care what you do with it.

When I read the doc string, I found it confusing.  I looked at the code and
understood.  It is _enough_ to say that \= escapes a \, preventing it from
introducing a substitution when followed by =, [, etc.

Or as I said in the beginning:

> This is uncessarily complex and misleading.  All the `\=' does is
> quote/escape the (single) next character, whatever it is.  Nothing
> more.






  reply	other threads:[~2011-07-15 19:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-25 21:29 bug#8935: 24.0.50; `substitute-command-keys' doc Drew Adams
2011-07-15 14:32 ` Lars Magne Ingebrigtsen
2011-07-15 15:33 ` Andreas Schwab
2011-07-15 16:00   ` Drew Adams
2011-07-15 16:35   ` Lars Magne Ingebrigtsen
2011-07-15 16:35   ` Lars Magne Ingebrigtsen
2011-07-15 17:23     ` Drew Adams
2011-07-15 17:28       ` Lars Magne Ingebrigtsen
2011-07-15 18:38         ` Andreas Schwab
2011-07-15 19:17           ` Drew Adams [this message]
2011-07-15 20:09             ` Andreas Schwab
2011-07-15 19:18         ` Drew Adams
2011-07-15 19:22           ` Lars Magne Ingebrigtsen
2011-07-15 19:25             ` Drew Adams
2011-07-18 13:55   ` Stefan Monnier
2011-07-18 14:27     ` Andreas Schwab
2011-07-18 16:20       ` Stefan Monnier

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

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

  git send-email \
    --in-reply-to=52B42160EFF24B69AE5BBAC0A0D03346@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=8935@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=schwab@linux-m68k.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.