[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Why does show_help_echo call substitute_command_keys?
From: |
Clément Pit-Claudel |
Subject: |
Why does show_help_echo call substitute_command_keys? |
Date: |
Thu, 20 Jul 2017 19:05:45 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
Hi emacs-devel,
I'm puzzled by this bit of code in show_help_echo:
if (STRINGP (help) || NILP (help))
{
if (!NILP (Vshow_help_function))
call1 (Vshow_help_function, Fsubstitute_command_keys (help));
help_echo_showing_p = STRINGP (help);
}
This is causing trouble in Flycheck, because we set help-echo properties on
error spans and we expect them to be displayed without modifications when users
hover over them. Is there a way to disable command-key- (and quote-)
substitution in help-echo strings?
Concrete example:
(with-current-buffer (get-buffer-create "A")
(erase-buffer)
(insert "AAA")
(put-text-property (point-min) (point-max) 'help-echo "Expected a 'list<'a>',
got a 'pair<'a,'a>'")
(pop-to-buffer (current-buffer)))
(put your mouse on the "AAA" part, and notice that the quotes were substituted)
Thanks!
Clément.
RE: Why does show_help_echo call substitute_command_keys?, Drew Adams, 2017/07/21