bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15653: 24.3; call-interactively not sending keys


From: Eli Zaretskii
Subject: bug#15653: 24.3; call-interactively not sending keys
Date: Sat, 17 Aug 2019 10:18:41 +0300

> From: Lars Ingebrigtsen <address@hidden>
> Date: Wed, 14 Aug 2019 20:12:08 -0700
> Cc: address@hidden
> 
> > (defun test-me () 
> > (interactive) 
> > (message "Test Me: %s" (key-description (this-single-command-keys)))) 
> >
> > (defun test-me-2 () 
> > (interactive) 
> > (message "Test Me 2: %s" (key-description (this-single-command-keys))) 
> > (call-interactively 'test-me nil (read-kbd-macro "C-1" t))) 
> >
> > (global-set-key (read-kbd-macro "C-c a" t) 'test-me-2) 
> >
> > Then, Type C-c a. The message shows: 
> >
> > Test Me 2: C-c a 
> > Test Me: C-c a 
> >
> > It should show 
> >
> > Test Me 2: C-1 
> > Test Me: C-c a 

I don't understand the expectation: nothing in the documentation says
that the KEYS argument to call-interactively is stuffed into what
this-single-command-keys will return.  The documentation says that the
KEYS argument will be used instead of this-single-command-keys when
the called command needs to access the events that invoked it, that's
all.

> Optional third arg KEYS, if given, specifies the sequence of events to
> supply, as a vector, if the command inquires which events were used to
> invoke it.
> ---
> 
> But apparently `this-single-command-keys' is not the way to inquire
> about what events were used to invoke it, and I'm not quite sure what
> this is in reference to.  I thought that perhaps it was an interactive
> spec or something, but no.

Yes, it _is_ the interactive spec.  When that spec uses 'e' or '@' or
something else that needs to analyze the invoking events, then Emacs
provides the information from KEYS instead.

I don't really see hat needs to be clarified in the docs, but given
the above, perhaps Lars or Matthew could propose a clarification?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]