2012-04-23 76 views

回答

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. 
+0

是的,我已經做到了。但即使在重新啓動emacs之後,我仍想堅持宏。 – zinking 2012-04-23 10:25:51

+4

這就是'insert-kbd-macro'所做的:「要保存一個kbd宏,訪問一個Lisp代碼文件,比如'〜/ .emacs',使用這個命令,然後保存該文件。 – 2012-04-23 10:46:41

+0

引用的手冊章節專門討論將記錄的宏保存到init文件。 – 2012-04-23 12:19:37