 (global-set-key [f7] 'previous-error)
 (global-set-key [f8] 'next-error)
 ;}
-;format{
+;format
 ;F9:格式化代码，以使代码缩进清晰，容易阅读
 ;(global-set-key [f9] 'c-indent-line-or-region)
 ;;F10:注释 / 取消注释

   )
  ((> emacs-major-version 21)
   (cua-mode t)
   (setq cua-auto-tabify-rectangles nil); Don't tabify after rectangle commands
   (transient-mark-mode 1); No region when it is not highlighted
   (setq cua-keep-region-after-copy t); Standard Windows behavior
   (ido-mode t); or change t to both for buffers and files
   (setq ido-enable-prefix nil
         ido-save-directory-list-file "~/.emacs.d/ido.last"
         ido-work-directory-list '("~/Developer" "~/Desktop")
         ido-enable-flex-matching t
         ido-create-new-buffer 'always
         ido-use-filename-at-point t
         ido-confirm-unique-completion t
         ido-enable-last-directory-history t; remember last used dirs
         ido-use-url-at-point nil; don't use url at point (annoying)
         ido-max-prospects 10))
  ((>= emacs-major-version 23)
;   (electric-indent-mode t)
   )


(add-hook 'text-mode-hook 'turn-on-auto-fill)

;------------------------programming related----------------------
;打开代码折叠功能
;(add-hook 'c-mode-hook' 'hs-minor-mode)
