   (set-face-attribute 'default nil :font font)
   (set-frame-font font nil t))
 
-;; Reset threshold to its default after Emacs has startup, because a large
-;; GC threshold equates to longer delays whenever GC happens
-(add-hook 'emacs-startup-hook 'my/set-gc-threshold)
+;; my/init
+(add-hook 'after-init-hook 'my/init)
 
 ;; Packages
 (require 'package)

(defun my/set-gc-threshold ()
  "Reset `gc-cons-threshold' to its default value."
  (setq gc-cons-threshold 800000))

(custom-set-variables
 ;; custom-set-variables was added by Custom.

                                (setq-local emmet-expand-jsx-className? t)
                                (emmet-mode)
                                (local-set-key (kbd "TAB") 'emmet-expand-yas)))))
;; Yaml
(use-package yaml-mode
  :mode "\\.ya?ml$")

;; Dockerfile
(use-package dockerfile-mode
  :mode "Dockerfile")

;; Functions
(defun my/init ()
  ;; Reset threshold to its default after Emacs has startup, because a large
  ;; GC threshold equates to longer delays whenever GC happens
  (add-hook 'emacs-startup-hook 'my/set-gc-threshold)
  (add-hook 'emacs-lisp-mode-hook 'remove-elc-on-save)
  ;; Auto recompile if compilation window is visible
  (advice-add 'my/save-buffers :after (lambda () (when (get-buffer-window "*compilation*") (recompile))))
  (add-hook 'compilation-mode-hook 'my-compilation-hook))

(defun my/save-buffers ()
  (interactive)
  (save-some-buffers 'no-confirm)
  (message "buffers has been saved"))

(defun my/kill-or-close ()
  (interactive)
  (if (string= "*compilation*" (buffer-name))
      (delete-window)
    (kill-this-buffer)))

(defun my/disable-key-chord-mode ()
  (set (make-local-variable 'input-method-function) nil))
