unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
To: Emacs developers <emacs-devel@gnu.org>
Subject: Why does show_help_echo call substitute_command_keys?
Date: Thu, 20 Jul 2017 19:05:45 +0200	[thread overview]
Message-ID: <4f821efa-1448-8ba0-d164-abeff36180d4@gmail.com> (raw)

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.



             reply	other threads:[~2017-07-20 17:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-20 17:05 Clément Pit-Claudel [this message]
2017-07-21  8:48 ` Why does show_help_echo call substitute_command_keys? 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

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=4f821efa-1448-8ba0-d164-abeff36180d4@gmail.com \
    --to=cpitclaudel@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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).