I use the commands event-apply-meta-modifier
and event-apply-super-modifier
to have keys I can tap that apply the meta and super modifier to the next typed shortcut. But when I first apply the meta modifier, then tap the key that should apply the super modifier, Emacs doesn't stack the modifiers but instead says
M-` is undefined
(I have event-apply-super-modifier
on the `-key). So I tried to define a command
(defun ahp/event-apply-meta-and-super-modifier ()
"This function kills all lines in the buffer of a regexp-search using the all-package."
(interactive)
(call-interactively 'event-apply-meta-modifier)
(call-interactively 'event-apply-super-modifier)
)
But when I use this command Emacs says
ahp/event-apply-meta-and-super-modifier: Wrong type argument: commandp, event-apply-meta-modifier
How can I make this command work?
event-apply-meta-modifier
is not a command(read-event)
, so you have two different events, one in each call - what you want to do is modify the same event twice: I don't think that's possible with these functions: you'll have to go to a lower-level function.