From 6aa38dfce2559d10245d19593037eae4c684ad82 Mon Sep 17 00:00:00 2001 From: Wojciech Kozlowski Date: Thu, 24 Aug 2017 22:41:18 +0100 Subject: [PATCH] Further init.el reorganisation --- init.el | 50 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/init.el b/init.el index eed13b8..16468c6 100644 --- a/init.el +++ b/init.el @@ -13,11 +13,6 @@ (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. ;; -------------------------------------------------------------------------- @@ -59,6 +54,21 @@ (add-to-list 'custom-theme-load-path "~/.emacs.d/themes/") (load-theme 'havoc t) ;; Load personal theme + ;; -------------------------------------------------------------------------- + ;; Change file in which custom variable changes are saved. + ;; -------------------------------------------------------------------------- + (setq custom-file "~/.emacs.d/custom.el") + + + ;; *********************************************************************** ;; + ;; ;; + ;; ;; + ;; Visual configuration must come before this point so that the frame can ;; + ;; be set up before before time consuming package management. ;; + ;; ;; + ;; ;; + ;; *********************************************************************** ;; + ;; -------------------------------------------------------------------------- ;; Package configuration. ;; -------------------------------------------------------------------------- @@ -89,6 +99,22 @@ "IndianRed3" "IndianRed4")) + + ;; *********************************************************************** ;; + ;; ;; + ;; ;; + ;; Any further non-package specific configuration should be set below this ;; + ;; point so that it does not get overridden by package configuration. ;; + ;; ;; + ;; ;; + ;; *********************************************************************** ;; + + ;; -------------------------------------------------------------------------- + ;; Load any custom variables. + ;; -------------------------------------------------------------------------- + (when (file-exists-p custom-file) + (load custom-file)) + ;; -------------------------------------------------------------------------- ;; Formatting ;; -------------------------------------------------------------------------- @@ -137,14 +163,14 @@ ;; http://bling.github.io/blog/2016/01/18/why-are-you-changing-gc-cons-threshold/ ;; -------------------------------------------------------------------------- - (defun my-minibuffer-setup-hook () + (defun minibuffer-gc-setup-hook () (setq gc-cons-threshold most-positive-fixnum)) - (defun my-minibuffer-exit-hook () + (defun minibuffer-gc-exit-hook () (setq gc-cons-threshold 800000)) - (add-hook 'minibuffer-setup-hook #'my-minibuffer-setup-hook) - (add-hook 'minibuffer-exit-hook #'my-minibuffer-exit-hook) + (add-hook 'minibuffer-setup-hook #'minibuffer-gc-setup-hook) + (add-hook 'minibuffer-exit-hook #'minibuffer-gc-exit-hook) ;; -------------------------------------------------------------------------- ;; Increase recursion limits. @@ -152,10 +178,4 @@ (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.