如何在emacs中解除绑定前缀命令? [英] How to unbind prefix commands in emacs?

查看:158
本文介绍了如何在emacs中解除绑定前缀命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试更改一些软件包的快捷方式,我成功地将大多数软件包绑定。但是,如果我看到 Ch b 的快捷方式描述,绑定到前缀命令的键仍然保留,即使我用 define-key指定了零

I'm currently trying to change shortcuts of some packages, and I successfully unbound most of them. However, if I see shortcut description by C-h b, keys bound to "Prefix Command" still remains even if I assign nil to it with define-key.

具体来说,我正在更改我的快捷方式的撤消树包,即使我把

Specifically, I was changing my shortcuts of undo-tree package, and even if I put

(define-key undo-tree-map (kbd "C-x r") nil)
(define-key undo-tree-map (kbd "C-x r u") nil)
(define-key undo-tree-map (kbd "C-x r U") nil)

到init.el中,绑定描述仍然表示 Cx r 仍然绑定到Prefix Command。

into init.el, binding description still says C-x r is still bound to "Prefix Command".

如何从绑定列表中删除此密钥?

How can I remove this key from binding list?

推荐答案

Drew的答案可能是正确的,但是有些情况下您可能不知道要使用哪个键盘映射,或者您可能不希望(或能够)修改保存绑定的键盘映射。在这种情况下,您可以用较高优先级的键盘映射覆盖它,例如:

Drew's answer is probably the right one, but in some cases you may not know which keymap to use, or you may not want to (or be able to) modify the keymap that holds the binding. In that case, you can override it in a keymap of higher precedence with, e.g.:

(define-key undo-tree-map (kbd "C-x r") 'undefined)

这篇关于如何在emacs中解除绑定前缀命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆