I have a usecase for
last-command, because I'd like a double invocation of a command to behave differently (it's an indenter, FWIW).
Some manual interactive experiments suggest that invoking commands manually with
M-x or key combinations set the
this-command and cycle
last-command, which can sometimes get confusing if the command has any
kill-* behaviour in it. This is as expected.
However, when called from my ert tests, even if I invoke functions with
How can I make my scripted ert tests invoke commands so that
last-command behave the same as when the user is entering those commands?