在命令后挂钩中,kill-word的这个命令不知何故已经变成了杀死区域 [英] In post-command-hook, this-command for kill-word has turned into kill-region somehow
问题描述
在我的 post-command-hook
回调中,当我执行 kill-word
时, this-command
var is kill-region
- 而不是 kill-word
as
In my post-command-hook
callback, when I do kill-word
, the this-command
var is kill-region
- and not kill-word
as expected.
我猜这是因为 kill-word
使用 kill-region
,但是确切地知道使用哪个命令对于我的脚本是至关重要的。
I guess that's because kill-word
uses kill-region
, but knowing exactly which command was used is essential to my script. Any way to get at that information somehow?
谢谢
推荐答案
结果所有的kill命令将 this-command
更改为 kill-region
,以便他们可以将附加内容进行交互操作杀死戒指要获得实际的命令,emacs有 this-original-command
- 它没有被修改。
Turns out all the kill-commands change this-command
to kill-region
so they can interoperate on appending things to the kill ring. To get to the actual command, emacs has this-original-command
- which is not modified.
这篇关于在命令后挂钩中,kill-word的这个命令不知何故已经变成了杀死区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!