In the command after the command, this command for kill-word turned into kill-region somehow

In my post-command-hook callback, when I do kill-word , this-command var is kill-region - and not kill-word , as expected.

I assume that since kill-word uses kill-region , but knowing exactly which command was used is important for my script. Any way to get this information somehow?

thanks

+6
source share
1 answer

Turns off all kill-commands this-command commands to kill-region so that they can interact when things are added to the kill ring. To jump to the actual command, emacs has this-original-command - which does not change.

+6
source

Source: https://habr.com/ru/post/906730/


All Articles