如何在emacs中找到密钥绑定的位置? [英] how to find where a key binding is defined in emacs?

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

问题描述

某些 shift + m 被绑定到emacs中的 Meta 键。现在我不能输入任何以 M开头的单词,如 Mock 。我想知道为什么会发生这种情况,或者是哪个软件包导致这种情况。



有一个一个问题,但是不能解决这个问题。 / p>

我试过 C hkm 显示 m运行命令self-insert-command



但是当我尝试 C hk M 它正在激活 Meta 键,正在等待另一个键输入。



C hc M 也是一样。



有什么办法找出原因是什么?



更新:


  1. 我的emacs配置 https://github.com /ChillarAnand/.emacs.d


  2. 问题不是在OS级别发生。如果我用 emacs -Q 启动emacs,一切都正常。



解决方案

问题是代码

 (define-key smartparens-mode-map(kbdM up)nil )
(define-key smartparens-mode-map(kbdM down)nil)))

这不绑定 shift m 作为 Meta ,而是绑定密钥序列 M up M down nil 。要在 kbd 内使用 M- {键} 指定,请指定 up 使用< up> ,代码有问题:

 code>(define-key smartparens-mode-map(kbdM- <上>)nil)
(define-key smartparens-mode-map(kbdM- < )nil)))


Somehow shift + m is got bound to Meta key in emacs. Now I cant type any words that start with M like Mock. I want to find why it is happening or which package is causing this.

There is one question regarding this issue but doesn't solve this problem.

I tried C h k m which showed m runs command self-insert-command

But when when i try C h k M it is activating Meta key and is waiting for another key to input.

The same is happening with C h c M.

Is there any way to find out what is causing this?

Update:

  1. My emacs config https://github.com/ChillarAnand/.emacs.d

  2. The problem is not occuring at OS level. If I start emacs with emacs -Q everything works fine.

解决方案

The problem was the code

(define-key smartparens-mode-map (kbd "M up") nil)
(define-key smartparens-mode-map (kbd "M down") nil)))

This doesn't bind shift m as Meta but rather binds the key sequences M u p and M d o w n to nil. To specify Meta inside kbd use M-{the key}, to specify up use <up>, for the code in question:

(define-key smartparens-mode-map (kbd "M-<up>") nil)
(define-key smartparens-mode-map (kbd "M-<down>") nil)))

这篇关于如何在emacs中找到密钥绑定的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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