2012-04-23 27 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