From 1a1399a9059858b3cfedd9aa133d5b85417e1bfa Mon Sep 17 00:00:00 2001 From: Wojciech Kozlowski Date: Thu, 24 Aug 2017 22:14:10 +0100 Subject: [PATCH] Move custom variables to their own file --- .gitignore | 3 ++- init.el | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7934c42..279c7c6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ auto-save-list bookmarks -elpa \ No newline at end of file +elpa +custom.el diff --git a/init.el b/init.el index f2936d8..eed13b8 100644 --- a/init.el +++ b/init.el @@ -13,6 +13,11 @@ (let ((gc-cons-threshold most-positive-fixnum)) + ;; -------------------------------------------------------------------------- + ;; Change file in which custom variable changes are saved. + ;; -------------------------------------------------------------------------- + (setq custom-file "~/.emacs.d/custom.el") + ;; -------------------------------------------------------------------------- ;; Visual configuration. ;; -------------------------------------------------------------------------- @@ -147,4 +152,10 @@ (setq-default max-specpdl-size 20000) ;; ~15x original value (setq-default max-lisp-eval-depth 24000) ;; 30x orignal value + ;; -------------------------------------------------------------------------- + ;; Load any custom variables. + ;; -------------------------------------------------------------------------- + (when (file-exists-p custom-file) + (load custom-file)) + ) ;; Reset garbage collection settings.