Globally override key binding in Emacs

后端 未结 8 2157
栀梦
栀梦 2020-11-22 06:51

How can I set a key binding that globally overrides and takes precedence over all other bindings for that key? I want to override all major/minor mode maps and make sure my

8条回答
  •  粉色の甜心
    2020-11-22 07:41

    Although scottfrazer's answer is exactly what you asked for, I will mention for posterity another solution.

    From The Emacs Manual:

    "Don't define C-c letter as a key in Lisp programs. Sequences consisting of C-c and a letter (either upper or lower case) are reserved for users; they are the only sequences reserved for users, so do not block them."

    If you bind your personal global bindings to C-c plus a letter, then you "should" be safe. However, this is merely a convention, and any mode is still able to override your bindings.

提交回复
热议问题