GNU bug report logs - #27470
26.0.50; this-command-keys and interactive input

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Sat, 24 Jun 2017 06:00:02 UTC

Severity: minor

Tags: patch

Found in version 26.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 27470 <at> debbugs.gnu.org
Subject: bug#27470: 26.0.50; this-command-keys and interactive input
Date: Sat, 24 Jun 2017 09:15:04 -0400
> (defun test (arg)
>   (interactive (list (read-from-minibuffer "Input: ")))
>   (message "%S" (cons this-command (this-command-keys)))
>   arg)

Whether it's a bug or not is hard to say (the quirk is described in the
doctring).  But you can get the behavior you want with:

    (defun sm-test (arg &optional keys)
      (interactive
        (let ((keys (this-command-keys-vector)))
          (list (read-from-minibuffer "Input: ") keys)))
      (message "%S" (cons this-command keys))
      arg)


-- Stefan




This bug report was last modified 7 years and 354 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.