emacs的键盘宏很好用啊
1 define a kbd macro
start by C-x (
end by C-x )
Give the last kbd macro a name:
2 name a kbd macro
M-x name-last-kbd-macro
we just need type M-x name, then press tab key. :)
3 eternal
If we want use the kbd macro after we restart emacs,
write it into the .emacs configure file.
open your .emacs file
M-x insert-kbd-macro
then give emacs the macro name you want save and press enter
4 key binding
Sometimes, we use a kbd macro often, then we could bind the macro
to a quick key by
(global-set-key "/C-cm" 'macro-name)
here /C means ctrl key. '-' means and.
×××××××××××××××××××××××××××××××××××××××××××××××××
×××××××××××××××××××××××××××××××××××××××××××××××××
对于const的使用心得:
只需将const右面的内容括起来即可,const只修饰其右面的内容
例如:
const (int *p)-->指向整型常量的指针
int const (*P)-->同上
int * const (p)-->指针是常量,其指向的值可变。