         (concat c-eldoc-includes
                 " `pkg-config gtk+-3.0 --cflags`"))
   )
+;;; ===================== cc mode config ==================
+(defun hong/my-cc-common-config ()
+  ;; indent
+  (setq c-default-style "k&r"
+        c-basic-offset  4)
+  )
 (defun hong/my-c-mode-config ()
   "C/C++ only"
   ;; c-eldoc

(autoload 'doxygen-insert-function-comment "doxygen" "insert comment for the function at point" t)
(autoload 'doxygen-insert-file-comment "doxygen" "insert comment for file" t)

;;; gdb
(setq gdb-many-windows t)
(setq gdb-show-main   t)

(defun hong/my-cc-common-config ()
  ;; indent
  (setq c-default-style "k&r"
        c-basic-offset  4)
  ;; compile
  (setq compile-command "make")
  (setq compilation-window-height 12)
  (setq compilation-read-command t)
  ;; (setq compilation-auto-jump-to-first-error t)
  (setq compilation-finish-function
        (lambda (buf str)
          (if (string-match "exited abnormally" str)
              (message "compilation errors, press C-x ` to visit'")
            (when (string-match "*compilation*" (buffer-name buf))
              (select-window (get-buffer-window "*compilation*"))
              ;; (bury-buffer "*compilation*")
              ;; (winner-undo)
              (message "NO COMPILATION ERRORS!")))))
  )
;;; gtk
(defun hong/gtk-headers ()
  (let* ((cmd "pkg-config --cflags gtk+-3.0")
         (gtk (split-string

  (font-lock-add-keywords 'c-mode '("typeof" "__attribute__"))
  )

(add-hook 'after-init-hook 'hong/my-compile-common-config)
(add-hook 'c-mode-common-hook
          (lambda ()
            (hong/my-cc-common-config)
