all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Why does show_help_echo call substitute_command_keys?
@ 2017-07-20 17:05 Clément Pit-Claudel
  2017-07-21  8:48 ` Yuri Khan
  0 siblings, 1 reply; 12+ messages in thread
From: Clément Pit-Claudel @ 2017-07-20 17:05 UTC (permalink / raw)
  To: Emacs developers

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.



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-07-21 17:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.