summary refs log tree commit diff
path: root/emacs/init.el
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-06-03 15:50:39 -0700
committerFranck Cuny <franck@fcuny.net>2022-06-03 15:50:39 -0700
commit855ad82749aef2b74f85937339ac87105d99ffc2 (patch)
treeef3f3df08f6a9a197fbe29f0bc2ae5b470233f71 /emacs/init.el
parentfeat(project): add `go.mod' to the list of files that define a project (diff)
downloademacs.d-855ad82749aef2b74f85937339ac87105d99ffc2.tar.gz
fix(emacs): specify where to store customizations
Don't add them to init.el, since it's specific to different machines.

Change-Id: Ia9753ae86e9a4563628fdb1043ed3d2b99c0c8f5
Diffstat (limited to '')
-rw-r--r--emacs/init.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/emacs/init.el b/emacs/init.el
index 5256c39..2706e43 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -3,6 +3,13 @@
 
 ;;; Code:
 
+;; store all the customizations into that file. if the file does not
+;; exists, we create an empty file, and then we load it.
+(setq custom-file (expand-file-name "var/custom.el" user-emacs-directory))
+(when (not (file-exists-p custom-file))
+  (write-region "" nil custom-file))
+(load custom-file)
+
 (setq gc-cons-threshold 64000000)
 (add-hook 'after-init-hook #'(lambda ()
                                ;; restore after startup