diff options
author | Vincent Ambo <tazjin@google.com> | 2019-12-14T13·35+0000 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2019-12-14T13·35+0000 |
commit | bd7903815de06c85843a8ccd616ee99f883720e3 (patch) | |
tree | f471f3aef406c2651a30abcc7dfd5d8ff4ef1516 | |
parent | c490bbf4b3d57df111476f76f3a5c8ad2d04fa33 (diff) |
feat(emacs.d): Load local Emacs configuration if present r/142
This allows me to have local Emacs configuration that is tracked separately from the rest.
-rw-r--r-- | tools/emacs/init.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/emacs/init.el b/tools/emacs/init.el index ea149550110a..eb78461433a2 100644 --- a/tools/emacs/init.el +++ b/tools/emacs/init.el @@ -93,6 +93,8 @@ ;; Don't indent after '>' while I'm writing (local-set-key ">" 'self-insert-command))))) +(use-package f) + (use-package go-mode :bind (:map go-mode-map ("C-c C-r" . recompile) :map go-mode-map ("<tab>" . company-indent-or-complete-common)) @@ -151,6 +153,10 @@ (telephone-line-setup) (ace-window-display-mode)) +;; If a local configuration file exists, it should be loaded. +(let ((local-file (expand-file-name (f-join user-emacs-directory "local.el")))) + (when (f-exists? local-file) + (load local-file))) ;; Some packages can only be initialised after the rest of the ;; settings has been applied: |