 ;(require 'semantic/sb)	; semantic speedbar
 ;(semantic-mode 1)
 ;}
-;(setq hs-minor-mode t)
-;(setq abbrev-mode t)
+(setq hs-minor-mode t)
+(setq abbrev-mode t)
 ;------------------indent------------------
-(setq-default indent-tabs-mode nil)
-(set-default 'indent-empty-lines t)
-(set-default 'imenu-auto-rescan t)
+(setq-default indent-tabs-mode nil
+              tab-width 4
+              indent-empty-lines t
+              imenu-auto-rescan t
+              backward-delete-function nil; DO NOT expand tabs when deleting
+              ;---------cc mode-----------
+              c-basic-offset 4
+              c-indent-tabs-mode t ; Press tab should cause indent
+              c-tab-always-indent t
+              c-argdecl-indent 0; Do not indent argument decl's extra
+              c-indent-level 4 ; A Tab is equivilent to 4 spaces
+              ; preprocessor
+              c-macro-shrink-window-flag t
+              c-macro-preprocessor "cpp"
+              c-macro-cppflags " "
+              c-macro-prompt-flag t
+              )
+
 (add-hook 'text-mode-hook 'turn-on-auto-fill)
-;(setq tab-width 4 c-basic-offset 4)
+
 ;;-----------------------cc mode---------------------
-;(setq-default c-basic-offset 4
-;			  tab-width 4
-;			  indent-tabs-mode t)
-;(c-set-style "K&R")
-;自动缩进的宽度设置为4
-;(setq c-basic-offset 4)
 ;;;预处理设置
-;(setq c-macro-shrink-window-flag t)
-;(setq c-macro-preprocessor "cpp")
-;(setq c-macro-cppflags " ")
-;(setq c-macro-prompt-flag t)
 ;(require 'cc-mode)
 ;(c-set-offset 'inline-open 0)
 ;(c-set-offset 'friend '-)
 ;(c-set-offset 'substatement-open 0)
-
-;(setq-default c-indent-tabs-mode t; Press TAB should cause indentation
-;	      c-indent-level 4; A TAB is equivilent to four spaces
-;	      c-argdecl-indent 0; Do not indent argument decl's extra
-;	      c-tab-always-indent t
-;	      c-basic-offset 4
-;	      backward-delete-function nil); DO NOT expand tabs when deleting
-;
-;-----------------highlight----------------
-;;在buffer左侧显示行号
-;(dolist (hook (list
-;'c-mode-hook
-;'c++-mode-hook
-;'emacs-list-mode-hook
-;'list-interaction-mode-hook
-;'list-mode-hook
-;'emms-playlist-mode-hook
-;'java-mode-hook
-;'asm-mode-hook
-;'haskell-mode-hook
-;'erc-mode-hook
-;'sh-mode-hook
-;'makefile-gmake-mode-hook
-;))
-;(add-hook hook (lambda () (linum-mode 1))))
 
 ;------------------------programming related----------------------
 ;打开代码折叠功能

(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
(ac-config-default)

;(require 'auto-complete)
;(global-auto-complete-mode t)
;;auto-complete
;(add-to-list 'load-path "~/.emacs.d/plugins/auto-complete")
;(require 'auto-complete-config)
;(add-to-list 'ac-dictionary-directories "~/.emacs.d/plugins/auto-complete/ac-dict")
;(ac-config-default)


;---------------------------action--------------------------
; auto-indent yanked (pasted) code

      transient-mark-mode t
      color-theme-is-global t
      delete-by-moving-to-trash t
;      shift-select-mode nil
      truncate-partial-width-windows nil
      uniquify-buffer-name-style 'forward
      whitespace-style '(trailing lines space-before-tab
