Subject: Re: bug#55940: macOS: <ns-show-prefs> displayed as keybinding for \\[customize]

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 13 Jun 2022 17:07:17 +0200

Stefan Kangas <[email-masked]> writes:

> I have no idea how to press the key "<ns-show-prefs>" - I don't think
> there is such a button?  There is also the keybinding "s-," which is
> slightly more useful (but not as useful as showing just "M-x
> customize", IMHO.)

That is pretty obscure.  Do we have some mechanism for making
`substitute-command-keys' avoid such "keys"?  I vaguely remember a
similar problem with a different event like this showing up in doc
strings...

On the other hand, as Po says -- "<ns-show-prefs>" is an actual key
binding in NS builds, apparently?  So...  Uhm...

> Please consider showing "s-," or "M-x customize" instead of
> "<ns-show-prefs>" here.
>
> Steps to reproduce:
> 0. emacs -Q
> 1. C-h v calendar-date-style RET

I see that the \\=`...' syntax doesn't allow saying \\=`M-x foo' (it has
to be a valid key stroke).  I think it would make sense to allow
explicit M-x commands like this, so I've added this to Emacs 29.

But I've not amended the calendar-date-style doc string, because this
should be fixed in a more general way for `M-x customize', which I'm
sure is in a whole bunch of doc strings.  I'm not sure what the solution
here would be, though.  It would be easy enough to add a block-list
mechanism for `substitute-command-keys', but it seems a bit hacky.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no