From: Michael Heerdegen <michael_heerdegen@web.de>
To: 27470@debbugs.gnu.org
Subject: bug#27470: 26.0.50; this-command-keys and interactive input
Date: Sat, 24 Jun 2017 07:58:47 +0200 [thread overview]
Message-ID: <87y3siapuw.fsf@drachen> (raw)
Hello,
Evaluate this:
(defun test (arg)
(interactive (list (read-from-minibuffer "Input: ")))
(message "%S" (cons this-command (this-command-keys)))
arg)
(global-set-key [f12] #'test)
where f12 stands for some random key sequence.
Hit f12 and give any input. I get the following message:
(test . "^M")
I would expect (test . f12).
Obviously, `this-command-keys' returns the key confirming the input
instead of the key that has invoked the command. This contradicts the
descriptions in the documentation (docstring and manual). The docs only
mention an exception when a command calls `read-key-sequence', but this
is not the case here. FWIW, I would prefer fixing this over changing
the docs.
Thanks,
Michael.
In GNU Emacs 26.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
of 2017-06-19 built on drachen
Repository revision: 1b75af59b305867c89271905be72a05d06a4eff4
Windowing system distributor 'The X.Org Foundation', version 11.0.11903000
System Description: Debian GNU/Linux 9.0 (stretch)
next reply other threads:[~2017-06-24 5:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-24 5:58 Michael Heerdegen [this message]
2017-06-24 7:01 ` bug#27470: 26.0.50; this-command-keys and interactive input Eli Zaretskii
2017-06-25 5:53 ` Michael Heerdegen
2017-07-22 8:16 ` Eli Zaretskii
2017-07-23 15:44 ` Michael Heerdegen
2017-07-28 12:41 ` Eli Zaretskii
2017-06-24 13:15 ` Stefan Monnier
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=87y3siapuw.fsf@drachen \
--to=michael_heerdegen@web.de \
--cc=27470@debbugs.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).