about summary refs log tree commit diff
path: root/tools/emacs/init.el
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-12-14T13·35+0000
committerVincent Ambo <tazjin@google.com>2019-12-14T13·35+0000
commitbd7903815de06c85843a8ccd616ee99f883720e3 (patch)
treef471f3aef406c2651a30abcc7dfd5d8ff4ef1516 /tools/emacs/init.el
parentc490bbf4b3d57df111476f76f3a5c8ad2d04fa33 (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.
Diffstat (limited to '')
-rw-r--r--tools/emacs/init.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/emacs/init.el b/tools/emacs/init.el
index ea14955011..eb78461433 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: