Emacs defines a fair variety of objects that can be bound to keys, with e.g.
global-set-key. (The canonical list can be found here).
I would like to simulate the invocation of a keymap entry. For example, I would expect:
- If the object is a command, the command is run,
- If the object is a keyboard macro, it is replayed,
What is the simplest way to do this?