禁用次要模式键绑定
我在此处提出了一个问题,并得到了很好的答复,但问题结果与我的想法是什么。
我试图在 shell 模式下将某个功能分配给键 "Cc"
,但似乎有一个名为 tabbar-mode
有一个分配给 "Cc"
的前缀键,它会覆盖我的 shell 模式设置。如何禁用选项卡模式键分配?
我把它们放在 (require 'tabbar)
之后,但它们不起作用:
(defvar tabbar-mode-map nil)
(defvar tabbar-prefix-key nil)
I asked a question here, and got good responses, but the problem turned out to be different from what I had thought.
I am trying to assign a certain function to the key "C-c"
in shell mode, but it seems that a minor mode called tabbar-mode
has a prefix-key assigned to "C-c"
, which overrides my setting for shell mode. How can I disable tabbar mode key assignments?
I put these after (require 'tabbar)
, but they did not work:
(defvar tabbar-mode-map nil)
(defvar tabbar-prefix-key nil)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
(defvar)
仅在变量没有值时初始化该变量。有关详细信息,请参阅 Chfdefvar
RET。使用
(setq)
更改现有变量的值。为了防止在查找键绑定时使用模式的键盘映射,您可以从
minor-mode-map-alist
变量中将其删除:(defvar)
only initialises a variable if it has no value. See C-hfdefvar
RET for details.Use
(setq)
to change the value of an existing variable.To prevent the mode's keymap from being used when looking up key-bindings, you can delete it from the
minor-mode-map-alist
variable: