               ;; no untabify in makefile
               (and (equal mode-hook 'makefile-mode-hook)
                    (equal feature 'my-untabify))
+              ;; no untabify in golang source file
+              (and (equal mode-hook 'go-mode-hook)
+                   (equal feature 'my-untabify))
+              ;; don't delete trailing spaces in markdown files
+              ;; (which could represent linefeed)
               (and (equal mode-hook 'markdown-mode-hook)
                    (equal feature 'my-delete-trailing-space))))
         (add-hook mode-hook feature))))
 
 
-(defconst dw-tab-width 4)
-
-
-(defun dev-misc()
-  "Miscellaneous settings for software development."
-
-  ;; set tab width
-  (setq default-tab-width dw-tab-width)
-  (setq tab-width dw-tab-width)
-  (setq tab-stop-list (number-sequence dw-tab-width 120 dw-tab-width))
-
-  ;; 用空格而不用tab来对齐(默认用tab来对齐)
-  (setq-default indent-tabs-mode nil)
-
-  (require 'paren-settings)
-  )
-
-(dev-misc)
-
+(require 'paren-settings)
 
 (require 'occur-settings)
 

;;; 去tab化
(defun my-untabify()
  "Replace TAB with whitespace."
  (make-variable-buffer-local 'write-file-functions)
  (add-hook 'write-file-functions
            '(lambda()
               (save-excursion
                 (untabify (point-min) (point-max)))
               ;; Return nil for the benefit of `write-file-functions'.
               nil)))



  (setq delete-trailing-lines nil))


(defconst dw-tab-width 4)

(defun dw-tab-settings ()
  "Settings for tab in various file formats."

  ;; 用空格而不用tab来对齐(默认用tab来对齐)
  (setq-default tab-width 4)
  (setq-default indent-tabs-mode nil)
  (setq tab-stop-list (number-sequence dw-tab-width 120 dw-tab-width))

  (dolist (mode-hook dev-mode-hook-list)
    (add-hook mode-hook
              '(lambda ()
                 ;; set tab width
                 (setq tab-width dw-tab-width))))
  )
(dw-tab-settings)

;; apply features
(dolist (mode-hook dev-mode-hook-list)
  (dolist
