emacs-devel
[Top][All Lists]
Advanced

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

RE: Why does show_help_echo call substitute_command_keys?


From: Drew Adams
Subject: RE: Why does show_help_echo call substitute_command_keys?
Date: Fri, 21 Jul 2017 07:54:42 -0700 (PDT)

> 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?

Tooltips are not expected to display keys, change quote chars, etc.
But of course they are expected to "be able to" do that.  They are
expected to be able to display lots of things.

`tooltip-show-help' just shows "a help string", as it says.

There is nothing in the notion of a tooltip or the doc about
`tooltip-mode' or the doc about property `help-echo' or the
code in `tooltip.el' that suggests that a tooltip should be
about translating commands to keys or apostrophes to curly
quotes or should impose `substitute-command-keys' on the help
text it's given to display.

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.

> There should probably be a function that knows when and how to
> quote the characters that cause such substitution with \=.

A tooltip should not automatically try to substitute command
keys or change quote characters.  Why impose such behavior on
tooltips?

You should be able, by default, to pass text that contains
`\\[...]' etc. or quote chars to a tooltip and not have it
interpreted and transmogrified.



reply via email to

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