Subject: Advertised key-bindings

From: Stefan Monnier <[email-masked]>
Date: Sun, 16 Nov 2008 15:30:50 -0500

Severity: wishlist

[ resent from
  http://lists.gnu.org/archive/html/emacs-devel/2008-11/msg00494.html ]

> I don't remember for certain, but it looks like the sort of thing I do
> to control which key some help features will report for that command.

> This is meant to be like C-x u (advertised-undo) and C-_ (undo).
> If you put \\[advertised-undo] in a doc string, it is guaranteed
> to come out as C-x u, not C-_.  If they were both bound to `undo',
> then either one might come out.

Which reminds me: it's an OK hack to get this result, but it has some
annoying side-effects:
- C-h k C-/ will not show you that it's also bound to C-x u (even
  though C-x u is supposed to be the binding you advertise most).
- C-h k C-x u will not show you alternative bindings such as C-/ which
  are usually a lot more convenient to use when available.
- probably some others.

I think we should try and introduce a better way to get this result.
E.g. we could add an `advertized-binding' property to the command symbol
and then let where-is use it (after checking that it's indeed bound to
that command).

        Stefan