1
(Setq C - New - Buffer - Template
' (
; " # Include <stdio. h> \ n "
; " # Include <stdlib. h> \ n "
; " \ N "
; " Int main (void) {\ n "
; " \ N "
; " } \ N "
;))
" /* \ N "
" * ===================================================== ========================================================== =======\ N "
" * \ N "
" * Filename: Test. c \ n "
" * \ N "
" * Description: \ n "
" * \ N "
" * Version: 1.0 \ n "
" * Created: 07/29/2011 10:37:04 am \ n "
" * Revision: None \ n "
" * Compiler: GCC \ n "
" * \ N "
" * Author: kangle. Wang (Mn), wangkangluo1@gmail.com \ n "
" * Company: APE-TECH \ n "
" * \ N "
" * ===================================================== ========================================================== =======\ N "
" */\ N "
))
(Defun my - C - Style ()
" My editing style for. c files. "
(C - Mode)
( If (Zerop (Buffer - Size ))
(Tempo - Template - C - Skeleton )))
(Setq auto - Mode - Alist
(Cons ' ("\. C \\ '" . My-C-style) Auto-mode-alist ))
(Tempo - Define - Template " C-skeleton " C - New - Buffer - Template
Nil
" Insert a skeleton for A. C document " )
(Setq JS - New - Buffer - Template
' (
" /* Fuckof \ n "
))
(Defun my - JS - Style ()
" My editing style for. c files. "
(C - Mode)
( If (Zerop (Buffer - Size ))
(Tempo - Template - C - Skeleton )))
(Setq auto - Mode - Alist
(Cons ' ("\. Js \\ '" . My-js-style) Auto-mode-alist ))
(Tempo - Define - Template " C-skeleton " JS - New - Buffer - Template
Nil
" Insert a skeleton for A. C document " )
2