 ";                  \\)\n"
 	)
 )
+
+;-----------------shell mode---------------
+(autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t)
+(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on t)
+
+;-------------------compile mode------------------
+(add-hook 'java-mode-hook
+          (lambda()
+            (set (make-local-variable 'compile-command) (concat "javac " (buffer-name)))))
+; safe locals
+; we mark these as 'safe', so emacs22+ won't give us annoying warnings
+;(setq safe-local-variable-values
+;      (quote ((auto-recompile . t)
+;              (folding-mode . t)
+;              (outline-minor-mode . t)
+;              auto-recompile outline-minor-mode)))

      whitespace-style '(trailing lines space-before-tab
                                  indentation space-after-tab)
      whitespace-line-column 100
      )
;---------------------component toggle----------------
;disable tool-bar-mode

;(global-set-key (kbd "C-s") 'save-buffer)
;;;跳转到某行
;(global-set-key [(meta g)] 'goto-line)
(global-set-key (kbd "RET") 'newline-and-indent)
;---------------------------mode----------------------------------------
; uncomment the following line to override the default scratch messsage
(setq initial-scratch-message (concat
