[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why does show_help_echo call substitute_command_keys?

From: Clément Pit-Claudel
Subject: Re: Why does show_help_echo call substitute_command_keys?
Date: Fri, 21 Jul 2017 19:54:32 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 2017-07-21 19:49, Yuri Khan wrote:
> On Fri, Jul 21, 2017 at 9:54 PM, Drew Adams <address@hidden> 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).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]