From: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
To: Yuri Khan <yuri.v.khan@gmail.com>, Drew Adams <drew.adams@oracle.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Why does show_help_echo call substitute_command_keys?
Date: Fri, 21 Jul 2017 19:54:32 +0200 [thread overview]
Message-ID: <03d54b61-0635-587d-6b22-7a5b96f7ad69@gmail.com> (raw)
In-Reply-To: <CAP_d_8XL3r5_zAekSQSrESDVa51kMZjE8a9LMhocB9iF9yRuQA@mail.gmail.com>
On 2017-07-21 19:49, Yuri Khan wrote:
> On Fri, Jul 21, 2017 at 9:54 PM, Drew Adams <drew.adams@oracle.com> wrote:
>>> Because the help-echo property is the Emacs API to tooltips, and
>>> tooltips are expected to be able to display keyboard equivalents
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>> to clicking the thing that is pointed?
>>
>> A tooltip should just display whatever text it is handed,
>> with no fiddling with or elaboration of that text. If you
>> need such fiddling, whether by ``substitute-command-keys'
>> or `format' or something else, do it beforehand.
>
> Actually, client code that wishes to display a command key in a
> tooltip can set the help-echo property to a function. So, hardcoding
> the substitute-command-keys call in show_help_echo does not seem
> necessary after all.
Indeed, that's what we do in Flycheck (using a function).
If most menu bar entries are created by easy-menu-define, maybe it wouldn't even break much to change show_help_echo to not substitute command keys (easy-menu-define would add the command key substitution instead).
Clément.
prev parent reply other threads:[~2017-07-21 17:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-20 17:05 Why does show_help_echo call substitute_command_keys? Clément Pit-Claudel
2017-07-21 8:48 ` Yuri Khan
2017-07-21 9:01 ` Clément Pit-Claudel
2017-07-21 9:10 ` Yuri Khan
2017-07-21 9:19 ` Clément Pit-Claudel
2017-07-21 13:43 ` Stefan Monnier
2017-07-21 14:54 ` Drew Adams
2017-07-21 14:54 ` Drew Adams
2017-07-21 14:54 ` Drew Adams
2017-07-21 14:54 ` Drew Adams
2017-07-21 17:49 ` Yuri Khan
2017-07-21 17:54 ` Clément Pit-Claudel [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=03d54b61-0635-587d-6b22-7a5b96f7ad69@gmail.com \
--to=cpitclaudel@gmail.com \
--cc=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=yuri.v.khan@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).