如何在我的Emacs init文件中生成键盘宏?

时间:2012-04-23 09:58:48

标签: emacs macros

我经常定义一个特定的键盘宏,所以我认为每次加载Emacs时它都可以自动使用。

我该怎么做?

1 个答案:

答案 0 :(得分:5)

手册的save keyboard macros部分怎么样?

C-x C-k n
    Give a command name (for the duration of the Emacs session) to the most recently defined keyboard macro (kmacro-name-last-macro).
C-x C-k b
    Bind the most recently defined keyboard macro to a key sequence (for the duration of the session) (kmacro-bind-to-key).
M-x insert-kbd-macro
    Insert in the buffer a keyboard macro's definition, as Lisp code.