需要安装color-theme.el(见附件)
 
做个备份,晒一下自己的.emacs内容
 
适用于C语言
 
;;设置自动缩进
(setq indent-tabs-mode nil)
(setq default-tab-width 8)
(setq tab-width 8)
(setq tab-stop-list ())

;;set c program style
(add-hook 'c-mode-hook 'linux-c-mode)
(setq imenu-sort-function 'imenu--sort-by-name)
(defun linux-c-mode()
(define-key c-mode-map [return] 'newline-and-indent)
(interactive)
(c-set-style "K&R")
(c-toggle-auto-state)
(c-toggle-hungry-state)
(setq c-basic-offset 4)
(imenu-add-menubar-index)
(which-function-mode)
)
(setq visible-bell nil)
(require 'color-theme)
(color-theme-charcoal-black)
(setq visible-bell t)
(column-number-mode t)
(transient-mark-mode t)
(show-paren-mode t)
(tool-bar-mode -1)
(global-font-lock-mode t)
;;;; 关闭启动画面
(setq inhibit-startup-message t)
'(compile-command "gcc ")