       (setq-local local-abbrev-table (eval tblsym))))
 
   ;; Default to k&r style for C and C++
-  (add-hook 'c-mode-hook
-            (lambda ()
-              (add-to-list 'c-default-style '(c-mode . "k&r"))
-              (setq c-basic-offset 4)))
+  (with-eval-after-load 'cc-mode
+    (add-to-list 'c-default-style '(c-mode . "k&r")))
 
   ;; Auto-reload files in doc-mode
   (add-hook 'doc-view-mode-hook 'auto-revert-mode)


   ;; asm layer
   nasm-basic-offset 4

   ;; finance layer (ledger-mode)
   ;; Set up for hledger instead of ledger

  (add-to-list 'auto-mode-alist '("\\.\\(h?ledger\\|journal\\)$" . ledger-mode))

  ;; Add hledger income statement to ledger-mode reports
  (with-eval-after-load 'ledger-report
    (add-to-list 'ledger-reports
                 '("income" "%(binary) -f %(ledger-file) incomestatement")
                 t))

  ;; Enable additional org modules
  (with-eval-after-load 'org
    (add-to-list 'org-modules 'org-drill t))

  (defun org-drill-agenda ()
    "Execute org-drill with agenda scope regardless of the value of org-drill-scope."
