问题
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:
My emacs config https://github.com/ChillarAnand/.emacs.d
The problem is not occuring at OS level. If I start emacs with
emacs -Q
everything works fine.
回答1:
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)))
来源:https://stackoverflow.com/questions/29226265/how-to-find-where-a-key-binding-is-defined-in-emacs