 (add-hook 'emacs-lisp-mode-hook 'eldoc-mode)
 (require 'lisp-extra-font-lock)
 (lisp-extra-font-lock-global-mode 1)
-(add-hook 'after-save-hook
-          (lambda()
-            (require 'bytecomp)
-            (when (and
-                   (eq major-mode 'emacs-lisp-mode)
-                   (file-exists-p (byte-compile-dest-file (buffer-file-name)))
-                   (not (string-match
-                         "^\\.dir-locals.el$"
-                         (file-name-nondirectory
-                          (buffer-file-name)))))
-              (save-excursion
-                (byte-compile-file buffer-file-name)))))
+(add-hook 'after-save-hook #'my/compile-lisp-file)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; folio-mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 (use-package folio-mode :mode "\\.folio$"

                     protobuf-mode
                     dart-mode
                     folio-mode
                     markdown-mode
                     sh-mode
                     csharp-mode
                     awk-mode

              )))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; emacs-lisp-mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun my/compile-lisp-file ()
  "Byte-compile a lisp code file."
  (require 'bytecomp)
  (when (and
         (eq major-mode 'emacs-lisp-mode)
         (file-exists-p (byte-compile-dest-file (buffer-file-name)))
         (not (string-match
               "^\\.dir-locals.el$"
               (file-name-nondirectory
                (buffer-file-name)))))
    (save-excursion
      (byte-compile-file buffer-file-name))))

(add-hook 'emacs-lisp-mode-hook
          (lambda()
            (setq indent-tabs-mode nil)
