From 855ad82749aef2b74f85937339ac87105d99ffc2 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 3 Jun 2022 15:50:39 -0700 Subject: fix(emacs): specify where to store customizations Don't add them to init.el, since it's specific to different machines. Change-Id: Ia9753ae86e9a4563628fdb1043ed3d2b99c0c8f5 --- emacs/init.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'emacs/init.el') 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 -- cgit 1.4.1